aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Crane <cranes@google.com>2024-03-07 01:30:52 +0000
committerStephen Crane <cranes@google.com>2024-03-07 22:30:41 +0000
commitd6ff678042b6778ae1126886edaa3533e3ccad5c (patch)
tree07cef262186fb43ba0f94b80fe393d17658d8129
parent15ea577a888a0252cff1654710867073294657a8 (diff)
downloadcommon-d6ff678042b6778ae1126886edaa3533e3ccad5c.tar.gz
make: Fix Rust in kernel build issues
Fixes a build issue where multiple crates cannot be integrated because MODULE_RUST_STEM was not reset between modules. Also fixes a small build dependency issue where the Rust wrapper source was depending on the wrong filename containing crate stems. Test: build.py Bug: 304850822 Change-Id: I9ce00706e3524cf40d3dc06deec3347913b4c575
-rw-r--r--make/module.mk1
-rw-r--r--make/rust-toplevel.mk2
2 files changed, 2 insertions, 1 deletions
diff --git a/make/module.mk b/make/module.mk
index 16c03612..588432c6 100644
--- a/make/module.mk
+++ b/make/module.mk
@@ -430,6 +430,7 @@ MODULE_RUSTDOC_OBJECT :=
MODULE_RUSTDOCFLAGS :=
MODULE_ALL_DEPS :=
MODULE_RUST_DEPS :=
+MODULE_RUST_STEM :=
MODULE_SKIP_DOCS :=
MODULE_ADD_IMPLICIT_DEPS := true
diff --git a/make/rust-toplevel.mk b/make/rust-toplevel.mk
index 1906fb09..98d870df 100644
--- a/make/rust-toplevel.mk
+++ b/make/rust-toplevel.mk
@@ -46,7 +46,7 @@ RUST_WRAPPER_SRC := \#![feature(panic_abort)] \#![no_std] \
RUST_WRAPPER := $(BUILDDIR)/lk-crates.rs
$(RUST_WRAPPER): RUST_WRAPPER_SRC := $(RUST_WRAPPER_SRC)
-$(RUST_WRAPPER): $(SORTED_CRATE_NAMES_FILE)
+$(RUST_WRAPPER): $(SORTED_CRATE_STEMS_FILE)
@$(MKDIR)
echo "$(RUST_WRAPPER_SRC)" > "$@"