From a8b479083d93f0db8b08331b98e487dcec0dfa98 Mon Sep 17 00:00:00 2001 From: micky387 Date: Sat, 12 Oct 2024 10:40:41 -0400 Subject: [PATCH] envsetup.sh: Export LLVM_AOSP_PREBUILTS_VERSION with the current clang version from soong Needed for KERNEL_CLANG_VERSION if TARGET_KERNEL_CLANG_VERSION hasn't been set by the device config It's boring to change it on each Google change ... Change-Id: I1d682611cbf6c60d7ae6227b0b5afde591adf471 --- build/envsetup.sh | 3 +++ config/BoardConfigKernel.mk | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build/envsetup.sh b/build/envsetup.sh index f1d44b2e..7cc8f665 100644 --- a/build/envsetup.sh +++ b/build/envsetup.sh @@ -1,3 +1,6 @@ +CLANG_VERSION=$(build/soong/scripts/get_clang_version.py) +export LLVM_AOSP_PREBUILTS_VERSION="${CLANG_VERSION}" + # check to see if the supplied product is one we can build function check_product() { diff --git a/config/BoardConfigKernel.mk b/config/BoardConfigKernel.mk index 68fd6ea7..fb82aa23 100644 --- a/config/BoardConfigKernel.mk +++ b/config/BoardConfigKernel.mk @@ -108,7 +108,7 @@ ifneq ($(TARGET_KERNEL_CLANG_VERSION),) 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 := clang-r536225 + KERNEL_CLANG_VERSION := $(LLVM_AOSP_PREBUILTS_VERSION) endif TARGET_KERNEL_CLANG_PATH ?= $(BUILD_TOP)/prebuilts/clang/host/$(HOST_PREBUILT_TAG)/$(KERNEL_CLANG_VERSION)