summaryrefslogtreecommitdiff
path: root/scripts/Makefile.clang
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2023-01-11 20:05:10 -0700
committerMasahiro Yamada <masahiroy@kernel.org>2023-01-26 12:43:19 +0900
commitdb1547c56886742283d7566c872f89cbad76a14c (patch)
tree6a9157b6dd050b22bbb91434b96b1667ba37e1c8 /scripts/Makefile.clang
parent7db038d9790eda558dd6c1dde4cdd58b64789c47 (diff)
downloadlwn-db1547c56886742283d7566c872f89cbad76a14c.tar.gz
lwn-db1547c56886742283d7566c872f89cbad76a14c.zip
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/1587 Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Tested-by: Linux Kernel Functional Testing <lkft@linaro.org> Tested-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/Makefile.clang')
-rw-r--r--scripts/Makefile.clang2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/Makefile.clang b/scripts/Makefile.clang
index 87285b76adb2..70b354fa1cb4 100644
--- a/scripts/Makefile.clang
+++ b/scripts/Makefile.clang
@@ -36,6 +36,8 @@ endif
# so they can be implemented or wrapped in cc-option.
CLANG_FLAGS += -Werror=unknown-warning-option
CLANG_FLAGS += -Werror=ignored-optimization-argument
+CLANG_FLAGS += -Werror=option-ignored
+CLANG_FLAGS += -Werror=unused-command-line-argument
KBUILD_CFLAGS += $(CLANG_FLAGS)
KBUILD_AFLAGS += $(CLANG_FLAGS)
export CLANG_FLAGS