summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDivya Sharma <divyash@codeaurora.org>2020-02-14 15:35:56 -0800
committerRaghavendra Rao Ananta <rananta@codeaurora.org>2020-02-18 09:10:54 -0800
commit532df4cc098a751f41d1e948c7a2ffdba8b6b876 (patch)
tree75bffe66eb38d9fdb4b420b59dd6eaa8ef53144d
parent14ed51fef1b25f0010a703bd8f332da148ec2115 (diff)
kernel_definitions: Use clang as the HOSTCC for kernel build
upstream plans to deprecate gcc, use clang for HOSTCC. Bug: 148566020 Change-Id: Iee824bb3c949f142852a34e94b256af03d41c5d8
-rw-r--r--[-rwxr-xr-x]kernel_definitions.mk6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel_definitions.mk b/kernel_definitions.mk
index 2a57a49..907d690 100755..100644
--- a/kernel_definitions.mk
+++ b/kernel_definitions.mk
@@ -16,11 +16,11 @@ SOURCE_ROOT := $(shell pwd)
TARGET_KERNEL_MAKE_ENV := DTC_EXT=$(SOURCE_ROOT)/$(DTC)
TARGET_KERNEL_MAKE_ENV += DTC_OVERLAY_TEST_EXT=$(SOURCE_ROOT)/$(UFDT_APPLY_OVERLAY)
TARGET_KERNEL_MAKE_ENV += CONFIG_BUILD_ARM64_DT_OVERLAY=y
-TARGET_KERNEL_MAKE_ENV += HOSTCC=$(SOURCE_ROOT)/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/bin/x86_64-linux-gcc
+TARGET_KERNEL_MAKE_ENV += HOSTCC=$(SOURCE_ROOT)/$(SOONG_LLVM_PREBUILTS_PATH)/clang
TARGET_KERNEL_MAKE_ENV += HOSTAR=$(SOURCE_ROOT)/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/bin/x86_64-linux-ar
TARGET_KERNEL_MAKE_ENV += HOSTLD=$(SOURCE_ROOT)/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/bin/x86_64-linux-ld
-TARGET_KERNEL_MAKE_CFLAGS = "-I$(SOURCE_ROOT)/$(TARGET_KERNEL_SOURCE)/include/uapi -I/usr/include -I/usr/include/x86_64-linux-gnu -L/usr/lib -L/usr/lib/x86_64-linux-gnu -I$(SOURCE_ROOT)/$(TARGET_KERNEL_SOURCE)/include"
-TARGET_KERNEL_MAKE_LDFLAGS = "-L/usr/lib -L/usr/lib/x86_64-linux-gnu"
+TARGET_KERNEL_MAKE_CFLAGS = "-I$(SOURCE_ROOT)/$(TARGET_KERNEL_SOURCE)/include/uapi -I/usr/include -I/usr/include/x86_64-linux-gnu -I$(SOURCE_ROOT)/$(TARGET_KERNEL_SOURCE)/include -L/usr/lib -L/usr/lib/x86_64-linux-gnu -fuse-ld=lld"
+TARGET_KERNEL_MAKE_LDFLAGS = "-L/usr/lib -L/usr/lib/x86_64-linux-gnu -fuse-ld=lld"
BUILD_CONFIG := $(TARGET_KERNEL_SOURCE)/build.config.common
CLANG_VERSION := $(shell IFS="/"; while read LINE; do if [[ $$LINE == *"CLANG_PREBUILT_BIN"* ]]; then read -ra CLANG <<< "$$LINE"; for VERSION in "$${CLANG[@]}"; do if [[ $$VERSION == *"clang-"* ]]; then echo "$$VERSION"; fi; done; fi; done < $(BUILD_CONFIG))