aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrances Wingerter <wingerter@google.com>2024-01-25 11:58:48 -0500
committerFrances Wingerter <wingerter@google.com>2024-02-14 09:49:20 -0500
commitfb617c31d37b53845f71bf09780f925c8c651462 (patch)
tree7391d3921632017877af4183ca23f1cc1c265728
parent6440791888de53b6e0b75461c26c18770a316dab (diff)
downloadcommon-fb617c31d37b53845f71bf09780f925c8c651462.tar.gz
build: move GLOBAL_HOST_RUSTFLAGS from user-tasks.mk
we need this in the kernel build system because we now build some host Rust modules from it Bug: 304850822 Change-Id: I97ca652863cd08e0fe548936da6d0a3abbcaaa56
-rw-r--r--engine.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/engine.mk b/engine.mk
index 2cead77f..bebb08b3 100644
--- a/engine.mk
+++ b/engine.mk
@@ -65,6 +65,7 @@ OUTBIN := $(BUILDDIR)/lk.bin
OUTELF := $(BUILDDIR)/lk.elf
CONFIGHEADER := $(BUILDDIR)/config.h
TOOLCHAIN_CONFIG := $(BUILDDIR)/toolchain.config
+TRUSTY_HOST_LIBRARY_BUILDDIR := $(BUILDDIR)/host_lib
# Eliminate /usr/local/include and /usr/include to build kernel hermetically
GLOBAL_KERNEL_COMPILEFLAGS += --sysroot=fake_sysroot
@@ -104,7 +105,7 @@ GLOBAL_LTO_COMPILEFLAGS += \
-fvisibility-inlines-hidden \
# Rust flags for proc macros
-GLOBAL_HOST_RUSTFLAGS :=
+GLOBAL_HOST_RUSTFLAGS := -L "$(RUST_HOST_LIBDIR)" -L dependency=$(TRUSTY_HOST_LIBRARY_BUILDDIR)
# Rust flags, based on the flags used in AOSP
GLOBAL_SHARED_RUSTFLAGS := -C codegen-units=1 -C debuginfo=2 -C opt-level=3 -C relocation-model=pic