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
This commit is contained in:
Aaron Kling 2024-06-24 16:59:29 -05:00 committed by Bartłomiej Rudecki
parent 2ad7d803a8
commit d433589203
Signed by: przekichane
GPG key ID: 751F23C6F014EF76

View file

@ -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