简体   繁体   English

编译 kernel 时如何关闭警告?

[英]How do I turn off warnings when compiling a kernel?

I'm trying to compile an android kernel using clang and I'm getting warnings that I don't care about.我正在尝试使用 clang 编译 android kernel 并且我收到了我不关心的警告。 For compilation I use the command make -j3 CC=clang O=output , so I cannot just add the -Wno-everything argument as if I were using the command clang file.c .对于编译,我使用命令make -j3 CC=clang O=output ,所以我不能像使用命令clang file.c一样添加-Wno-everything参数。 As I understand it, I can disable some warnings by adding #pragma to the file that causes the error.据我了解,我可以通过将#pragma添加到导致错误的文件中来禁用一些警告。 But also I have one strange error that does not reference any file:但我也有一个奇怪的错误,它没有引用任何文件:

warning: unknown warning option '-Wno-vectorizer-no-neon' [-Wunknown-warning-option]

How can I turn off all warnings?如何关闭所有警告? Or at least this one.或者至少是这个。

PS: Sorry for my English. PS:对不起我的英语。

The solution was to add the -Wno-everything argument to the ARCH_CPPFLAGS parameter in the Makefile .解决方案是将-Wno-everything参数添加到Makefile中的ARCH_CPPFLAGS参数中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM