From d2fd6102ff20a9351d3e7ec53f8831c140d7b91f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= Date: Tue, 2 Apr 2024 13:40:05 -0700 Subject: make: rust: Move lib/rust_support dependency Move lib/rust_support from kernel/rules.mk to implicit dependency for rust kernel modules. It was added to kernel/rules.mk so the panic handler was included, but this also pulls lib/rust_support into kernels that don't have any rust modules and therefore does not need it. We also have CLs that add features to lib/rust_support that don't yet compile on arm/arm64 where CFI is enabled. Moving this depandency lets us extend lib/rust_support and use it on x86, where CFI is not yet enabled, while we wait for an updated toolchain. Bug: 328519718 Test: trusty/vendor/google/aosp/scripts/build.py generic-x86_64-test Change-Id: I6badf66f7b138fbbc77bdd1ace4161cf0d4cf9a6 --- kernel/rules.mk | 1 - make/module.mk | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/rules.mk b/kernel/rules.mk index e1719a61..433cda8e 100644 --- a/kernel/rules.mk +++ b/kernel/rules.mk @@ -5,7 +5,6 @@ MODULE := $(LOCAL_DIR) MODULE_DEPS := \ lib/debug \ lib/heap \ - lib/rust_support \ trusty/kernel/lib/rand ifeq ($(LK_LIBC_IMPLEMENTATION),lk) diff --git a/make/module.mk b/make/module.mk index 20f9e085..7a20424f 100644 --- a/make/module.mk +++ b/make/module.mk @@ -244,10 +244,12 @@ MODULE_ALL_DEPS := $(MODULE_LIBRARY_DEPS) $(MODULE_LIBRARY_EXPORTED_DEPS) $(MODU ifeq ($(call TOBOOL,$(MODULE_ADD_IMPLICIT_DEPS)),true) # In userspace, MODULE_ADD_IMPLICIT_DEPS adds std. -# In the kernel, it adds core and compiler_builtins. +# In the kernel, it adds core, compiler_builtins and +# lib/rust_support. MODULE_ALL_DEPS += \ trusty/user/base/lib/libcore-rust/ \ trusty/user/base/lib/libcompiler_builtins-rust/ \ + $(LKROOT)/lib/rust_support \ endif -- cgit v1.2.3