kernel: Fix specifying custom clang compiler version

* Folder layout name changed in Q

Change-Id: I823867334e87fbb3c240a92e62484b6531dfcd22
This commit is contained in:
Luca Stefani 2019-09-14 16:26:26 +02:00
parent 6ce1be3e15
commit 736f1be2e8

View file

@ -165,8 +165,7 @@ MODULES_INTERMEDIATES := $(KERNEL_BUILD_OUT_PREFIX)$(call intermediates-dir-for,
PATH_OVERRIDE :=
ifeq ($(TARGET_KERNEL_CLANG_COMPILE),true)
ifneq ($(TARGET_KERNEL_CLANG_VERSION),)
# Find the clang-* directory containing the specified version
KERNEL_CLANG_VERSION := $(shell find $(BUILD_TOP)/prebuilts/clang/host/$(HOST_OS)-x86/ -name AndroidVersion.txt -exec grep -l $(TARGET_KERNEL_CLANG_VERSION) "{}" \; | sed -e 's|/AndroidVersion.txt$$||g;s|^.*/||g')
KERNEL_CLANG_VERSION := clang-$(TARGET_KERNEL_CLANG_VERSION)
else
# Use the default version of clang if TARGET_KERNEL_CLANG_VERSION hasn't been set by the device config
KERNEL_CLANG_VERSION := $(LLVM_PREBUILTS_VERSION)