kernel: Fix specifying custom clang compiler version
* Folder layout name changed in Q
Change-Id: I823867334e87fbb3c240a92e62484b6531dfcd22
diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk
index 2c891e2..36352a5 100644
--- a/build/tasks/kernel.mk
+++ b/build/tasks/kernel.mk
@@ -165,8 +165,7 @@
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)