|
|
@ -230,15 +230,17 @@ KERNEL_TOOLCHAIN_PATH := $(KERNEL_TOOLCHAIN)/$(KERNEL_TOOLCHAIN_PREFIX)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BUILD_TOP := $(shell pwd)
|
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(TARGET_KERNEL_CLANG_COMPILE),true)
|
|
|
|
ifeq ($(TARGET_KERNEL_CLANG_COMPILE),true)
|
|
|
|
ifneq ($(TARGET_KERNEL_CLANG_VERSION),)
|
|
|
|
ifneq ($(TARGET_KERNEL_CLANG_VERSION),)
|
|
|
|
# Find the clang-* directory containing the specified version
|
|
|
|
# Find the clang-* directory containing the specified version
|
|
|
|
KERNEL_CLANG_VERSION := $(shell find $(ANDROID_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 := $(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')
|
|
|
|
else
|
|
|
|
else
|
|
|
|
# Use the default version of clang if TARGET_KERNEL_CLANG_VERSION hasn't been set by the device config
|
|
|
|
# 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)
|
|
|
|
KERNEL_CLANG_VERSION := $(LLVM_PREBUILTS_VERSION)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
TARGET_KERNEL_CLANG_PATH ?= $(ANDROID_BUILD_TOP)/prebuilts/clang/host/$(HOST_OS)-x86/$(KERNEL_CLANG_VERSION)/bin
|
|
|
|
TARGET_KERNEL_CLANG_PATH ?= $(BUILD_TOP)/prebuilts/clang/host/$(HOST_OS)-x86/$(KERNEL_CLANG_VERSION)/bin
|
|
|
|
ifeq ($(KERNEL_ARCH),arm64)
|
|
|
|
ifeq ($(KERNEL_ARCH),arm64)
|
|
|
|
KERNEL_CLANG_TRIPLE ?= CLANG_TRIPLE=aarch64-linux-gnu-
|
|
|
|
KERNEL_CLANG_TRIPLE ?= CLANG_TRIPLE=aarch64-linux-gnu-
|
|
|
|
else ifeq ($(KERNEL_ARCH),arm)
|
|
|
|
else ifeq ($(KERNEL_ARCH),arm)
|
|
|
@ -253,7 +255,7 @@ ifneq ($(USE_CCACHE),)
|
|
|
|
ccache := $(shell which ccache)
|
|
|
|
ccache := $(shell which ccache)
|
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(ccache),)
|
|
|
|
ifeq ($(ccache),)
|
|
|
|
ccache := $(ANDROID_BUILD_TOP)/prebuilts/misc/$(HOST_PREBUILT_TAG)/ccache/ccache
|
|
|
|
ccache := $(BUILD_TOP)/prebuilts/misc/$(HOST_PREBUILT_TAG)/ccache/ccache
|
|
|
|
# Check that the executable is here.
|
|
|
|
# Check that the executable is here.
|
|
|
|
ccache := $(strip $(wildcard $(ccache)))
|
|
|
|
ccache := $(strip $(wildcard $(ccache)))
|
|
|
|
endif
|
|
|
|
endif
|
|
|
@ -270,7 +272,7 @@ endif
|
|
|
|
ccache =
|
|
|
|
ccache =
|
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(HOST_OS),darwin)
|
|
|
|
ifeq ($(HOST_OS),darwin)
|
|
|
|
MAKE_FLAGS += C_INCLUDE_PATH=$(ANDROID_BUILD_TOP)/external/elfutils/libelf:/usr/local/opt/openssl/include
|
|
|
|
MAKE_FLAGS += C_INCLUDE_PATH=$(BUILD_TOP)/external/elfutils/libelf:/usr/local/opt/openssl/include
|
|
|
|
MAKE_FLAGS += LIBRARY_PATH=/usr/local/opt/openssl/lib
|
|
|
|
MAKE_FLAGS += LIBRARY_PATH=/usr/local/opt/openssl/lib
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|