Skip to content

Commit 7e20e47

Browse files
committed
kbuild: replace AS=clang with LLVM_IAS=1
The 'AS' variable is unused for building the kernel. Only the remaining usage is to turn on the integrated assembler. A boolean flag is a better fit for this purpose. AS=clang was added for experts. So, I replaced it with LLVM_IAS=1, breaking the backward compatibility. Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]>
1 parent 76426e2 commit 7e20e47

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Documentation/kbuild/llvm.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,14 @@ LLVM Utilities
5050
LLVM has substitutes for GNU binutils utilities. These can be invoked as
5151
additional parameters to `make`.
5252

53-
make CC=clang AS=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \\
53+
make CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \\
5454
OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump OBJSIZE=llvm-size \\
5555
READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar \\
5656
HOSTLD=ld.lld
5757

58+
Currently, the integrated assembler is disabled by default. You can pass
59+
`LLVM_IAS=1` to enable it.
60+
5861
Getting Help
5962
------------
6063

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ endif
538538
ifneq ($(GCC_TOOLCHAIN),)
539539
CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN)
540540
endif
541-
ifeq ($(if $(AS),$(shell $(AS) --version 2>&1 | head -n 1 | grep clang)),)
541+
ifneq ($(LLVM_IAS),1)
542542
CLANG_FLAGS += -no-integrated-as
543543
endif
544544
CLANG_FLAGS += -Werror=unknown-warning-option

0 commit comments

Comments
 (0)