kernel: Add GCC toolchains to the path
Tools like `as` only exist in the GCC toolchain, so we need that Change-Id: I025d0d9bdf6eda94a538d2d6ddafbecc8830f471
This commit is contained in:
parent
a5c9e3f6fc
commit
a0d74b1477
|
@ -169,7 +169,7 @@ ifeq ($(TARGET_KERNEL_CLANG_COMPILE),true)
|
|||
# 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)
|
||||
endif
|
||||
TARGET_KERNEL_CLANG_PATH ?= $(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)
|
||||
ifeq ($(KERNEL_ARCH),arm64)
|
||||
KERNEL_CLANG_TRIPLE ?= CLANG_TRIPLE=aarch64-linux-gnu-
|
||||
else ifeq ($(KERNEL_ARCH),arm)
|
||||
|
@ -177,7 +177,7 @@ ifeq ($(TARGET_KERNEL_CLANG_COMPILE),true)
|
|||
else ifeq ($(KERNEL_ARCH),x86)
|
||||
KERNEL_CLANG_TRIPLE ?= CLANG_TRIPLE=x86_64-linux-gnu-
|
||||
endif
|
||||
PATH_OVERRIDE := PATH=$(TARGET_KERNEL_CLANG_PATH):$$PATH LD_LIBRARY_PATH=$(BUILD_TOP)/prebuilts/clang/host/$(HOST_OS)-x86/$(KERNEL_CLANG_VERSION)/lib64:$$LD_LIBRARY_PATH
|
||||
PATH_OVERRIDE := PATH=$(TARGET_KERNEL_CLANG_PATH)/bin:$$PATH LD_LIBRARY_PATH=$(TARGET_KERNEL_CLANG_PATH)/lib64:$$LD_LIBRARY_PATH
|
||||
ifeq ($(KERNEL_CC),)
|
||||
KERNEL_CC := CC="$(CCACHE_BIN) clang"
|
||||
endif
|
||||
|
@ -187,6 +187,8 @@ ifeq ($(TARGET_KERNEL_MODULES),)
|
|||
TARGET_KERNEL_MODULES := INSTALLED_KERNEL_MODULES
|
||||
endif
|
||||
|
||||
PATH_OVERRIDE += PATH=$(KERNEL_TOOLCHAIN_PATH_gcc)/bin:$$PATH
|
||||
|
||||
# System tools are no longer allowed on 10+
|
||||
PATH_OVERRIDE += $(TOOLS_PATH_OVERRIDE)
|
||||
|
||||
|
|
|
@ -77,6 +77,10 @@ else
|
|||
KERNEL_TOOLCHAIN_PATH := $(KERNEL_TOOLCHAIN)/$(KERNEL_TOOLCHAIN_PREFIX)
|
||||
endif
|
||||
|
||||
# We need to add GCC toolchain to the path no matter what
|
||||
# for tools like `as`
|
||||
KERNEL_TOOLCHAIN_PATH_gcc := $(KERNEL_TOOLCHAIN_$(KERNEL_ARCH))/$(KERNEL_TOOLCHAIN_PREFIX_$(KERNEL_ARCH))
|
||||
|
||||
ifneq ($(USE_CCACHE),)
|
||||
ifneq ($(CCACHE_EXEC),)
|
||||
# Android 10+ deprecates use of a build ccache. Only system installed ones are now allowed
|
||||
|
|
Loading…
Reference in New Issue