提交 db1547c5 编写于 作者: N Nathan Chancellor 提交者: Masahiro Yamada

kbuild: Turn a couple more of clang's unused option warnings into errors

Currently, these warnings are hidden with -Qunused-arguments in
KBUILD_CPPFLAGS. Once that option is removed, these warnings should be
turned into hard errors to make unconditionally added but unsupported
flags for the current compilation mode or target obvious due to a failed
build; otherwise, the warnings might just be ignored if the build log is
not checked.

Link: https://github.com/ClangBuiltLinux/linux/issues/1587Signed-off-by: NNathan Chancellor <nathan@kernel.org>
Reviewed-by: NNick Desaulniers <ndesaulniers@google.com>
Tested-by: NLinux Kernel Functional Testing <lkft@linaro.org>
Tested-by: NAnders Roxell <anders.roxell@linaro.org>
Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
上级 7db038d9
...@@ -36,6 +36,8 @@ endif ...@@ -36,6 +36,8 @@ endif
# so they can be implemented or wrapped in cc-option. # so they can be implemented or wrapped in cc-option.
CLANG_FLAGS += -Werror=unknown-warning-option CLANG_FLAGS += -Werror=unknown-warning-option
CLANG_FLAGS += -Werror=ignored-optimization-argument CLANG_FLAGS += -Werror=ignored-optimization-argument
CLANG_FLAGS += -Werror=option-ignored
CLANG_FLAGS += -Werror=unused-command-line-argument
KBUILD_CFLAGS += $(CLANG_FLAGS) KBUILD_CFLAGS += $(CLANG_FLAGS)
KBUILD_AFLAGS += $(CLANG_FLAGS) KBUILD_AFLAGS += $(CLANG_FLAGS)
export CLANG_FLAGS export CLANG_FLAGS
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册