aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhyber Sen <khyber@google.com>2024-02-16 05:15:42 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2024-02-16 05:15:42 +0000
commit2cdddd8bf3a8c4c3657a8893a3bce64185b49884 (patch)
tree0a4b6eb8dd64d723bf96736384b70c1600014f53
parent5a09ef9c52d113f834f6fe6d16c0217ae20b3286 (diff)
parenteed28eae387726ef7e77cc0606d693868277f0af (diff)
downloadcommon-2cdddd8bf3a8c4c3657a8893a3bce64185b49884.tar.gz
build: add implicit `core` and `compiler_builtins` deps in the `#[no_std]` kernel am: eed28eae38
Original change: https://android-review.googlesource.com/c/trusty/lk/common/+/2962962 Change-Id: I44608863836f81b3d83caf2bef1a2f17057a1964 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--make/module.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/make/module.mk b/make/module.mk
index 8451b1e3..f52da73d 100644
--- a/make/module.mk
+++ b/make/module.mk
@@ -234,6 +234,16 @@ endif
# concatenate them to use whichever is set
MODULE_KERNEL_RUST_DEPS := $(MODULE_LIBRARY_DEPS) $(MODULE_LIBRARY_EXPORTED_DEPS) $(MODULE_DEPS)
+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.
+MODULE_KERNEL_RUST_DEPS += \
+ trusty/user/base/lib/libcore-rust/ \
+ trusty/user/base/lib/libcompiler_builtins-rust/ \
+
+endif
+
define READ_CRATE_INFO
QUERY_MODULE := $1
QUERY_VARIABLES := MODULE_CRATE_NAME MODULE_RUST_STEM MODULE_RUST_CRATE_TYPES