summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorNathan Chancellor <natechancellor@gmail.com>2019-06-27 15:14:48 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-07-03 19:28:29 -0400
commit876a0600896c1857c79cb58625ff012b27fea9fd (patch)
tree6f5f84b6c2913d42ecc5d4a775e7b0f23b757a56 /Makefile
parent6f9ac9f4427ec0470ccffbf852cfaf326677cc21 (diff)
kbuild: Add ability to test Clang's integrated assembler
There are some people interested in experimenting with Clang's integrated assembler. To make it easy to do so without source modification, allow the user to specify 'AS=clang' as part of the make command to avoid adding '-no-integrated-as' to the {A,C}FLAGS. Link: https://github.com/ClangBuiltLinux/linux/issues/577 Suggested-by: Dmitry Golovin <dima@golovin.in> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Tested-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c3b6dcd5b177..d6c3dbac312b 100644
--- a/Makefile
+++ b/Makefile
@@ -527,7 +527,9 @@ endif
527ifneq ($(GCC_TOOLCHAIN),) 527ifneq ($(GCC_TOOLCHAIN),)
528CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN) 528CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN)
529endif 529endif
530ifeq ($(shell $(AS) --version 2>&1 | head -n 1 | grep clang),)
530CLANG_FLAGS += -no-integrated-as 531CLANG_FLAGS += -no-integrated-as
532endif
531CLANG_FLAGS += -Werror=unknown-warning-option 533CLANG_FLAGS += -Werror=unknown-warning-option
532KBUILD_CFLAGS += $(CLANG_FLAGS) 534KBUILD_CFLAGS += $(CLANG_FLAGS)
533KBUILD_AFLAGS += $(CLANG_FLAGS) 535KBUILD_AFLAGS += $(CLANG_FLAGS)