]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: Set CC to clang in lib.mk if LLVM is set
authorYonghong Song <yhs@fb.com>
Tue, 13 Apr 2021 15:34:13 +0000 (08:34 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 15 Apr 2021 23:50:21 +0000 (16:50 -0700)
commit791ca2ccc6cfe69b862f18bf53cfca6b98e620f0
tree1d0e7086620667c3a2145fdc78b95a5a310e9513
parent1405c80823960d3dbe7c2dd6650fccfa2bba9041
selftests: Set CC to clang in lib.mk if LLVM is set

selftests/bpf/Makefile includes lib.mk. With the following command
  make -j60 LLVM=1 LLVM_IAS=1  <=== compile kernel
  make -j60 -C tools/testing/selftests/bpf LLVM=1 LLVM_IAS=1 V=1
some files are still compiled with gcc. This patch
fixed lib.mk issue which sets CC to gcc in all cases.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210413153413.3027426-1-yhs@fb.com
tools/testing/selftests/lib.mk