Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit db1547c

Browse files
nathanchancemasahir0y
authored andcommitted
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: ClangBuiltLinux/linux#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>
1 parent 7db038d commit db1547c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/Makefile.clang

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ endif
3636
# so they can be implemented or wrapped in cc-option.
3737
CLANG_FLAGS += -Werror=unknown-warning-option
3838
CLANG_FLAGS += -Werror=ignored-optimization-argument
39+
CLANG_FLAGS += -Werror=option-ignored
40+
CLANG_FLAGS += -Werror=unused-command-line-argument
3941
KBUILD_CFLAGS += $(CLANG_FLAGS)
4042
KBUILD_AFLAGS += $(CLANG_FLAGS)
4143
export CLANG_FLAGS

0 commit comments

Comments
 (0)