From d43358920306dfbcb1a24f68504b46a98816581e Mon Sep 17 00:00:00 2001 From: Aaron Kling Date: Mon, 24 Jun 2024 16:59:29 -0500 Subject: [PATCH] kernel: Add rust prebuilts to path Starting with android common kernel 6.6, rust is enabled for arm64 gki. It currently looks for rust version 1.73.0, so that was selected as the default. This was only added for the clang compile path as gki requires clang. Change-Id: Ie7b57568d74cfb4a28a94c8dc8f4b5c622044317 --- config/BoardConfigKernel.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/BoardConfigKernel.mk b/config/BoardConfigKernel.mk index cfa782ed..22a7e2dc 100644 --- a/config/BoardConfigKernel.mk +++ b/config/BoardConfigKernel.mk @@ -31,6 +31,7 @@ # TARGET_KERNEL_CLANG_PATH = Clang prebuilts path, optional # # TARGET_KERNEL_LLVM_BINUTILS = Use LLVM binutils, defaults to true +# TARGET_KERNEL_RUST_VERSION = Rust prebuilts version, optional # TARGET_KERNEL_NO_GCC = Fully compile the kernel without GCC. # Defaults to false # TARGET_KERNEL_VERSION = Reported kernel version in top level kernel @@ -96,6 +97,8 @@ else endif TARGET_KERNEL_CLANG_PATH ?= $(BUILD_TOP)/prebuilts/clang/host/$(HOST_PREBUILT_TAG)/$(KERNEL_CLANG_VERSION) +TARGET_KERNEL_RUST_VERSION ?= 1.73.0c + ifneq ($(USE_CCACHE),) ifneq ($(CCACHE_EXEC),) # Android 10+ deprecates use of a build ccache. Only system installed ones are now allowed @@ -188,7 +191,7 @@ else KERNEL_MAKE_FLAGS += HOSTCFLAGS="--sysroot=$(BUILD_TOP)/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/sysroot -I$(BUILD_TOP)/prebuilts/kernel-build-tools/linux-x86/include" KERNEL_MAKE_FLAGS += HOSTLDFLAGS="--sysroot=$(BUILD_TOP)/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/sysroot -Wl,-rpath,$(BUILD_TOP)/prebuilts/kernel-build-tools/linux-x86/lib64 -L $(BUILD_TOP)/prebuilts/kernel-build-tools/linux-x86/lib64 -fuse-ld=lld --rtlib=compiler-rt" - TOOLS_PATH_OVERRIDE += PATH=$(BUILD_TOP)/prebuilts/tools-tequila/$(HOST_PREBUILT_TAG)/bin:$(TARGET_KERNEL_CLANG_PATH)/bin:$$PATH + TOOLS_PATH_OVERRIDE += PATH=$(BUILD_TOP)/prebuilts/tools-tequila/$(HOST_PREBUILT_TAG)/bin:$(TARGET_KERNEL_CLANG_PATH)/bin:$(BUILD_TOP)/prebuilts/rust/$(HOST_PREBUILT_TAG)/$(TARGET_KERNEL_RUST_VERSION)/bin:$(BUILD_TOP)/prebuilts/clang-tools/$(HOST_PREBUILT_TAG)/bin:$$PATH endif # Set DTBO image locations so the build system knows to build them