Skip to content

Commit

Permalink
kernel: Add rust prebuilts to path
Browse files Browse the repository at this point in the history
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
  • Loading branch information
webgeek1234 authored and luk1337 committed Oct 21, 2024
1 parent 70ca038 commit 3d33aae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion config/BoardConfigKernel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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-lineage/$(HOST_PREBUILT_TAG)/bin:$(TARGET_KERNEL_CLANG_PATH)/bin:$$PATH
TOOLS_PATH_OVERRIDE += PATH=$(BUILD_TOP)/prebuilts/tools-lineage/$(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
Expand Down

0 comments on commit 3d33aae

Please sign in to comment.