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 committed by Jake Weinstein
parent dcdfd1a611
commit dc5fdd2f82
1 changed files with 1 additions and 2 deletions

View File

@ -166,8 +166,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)