Pass --remap-path-prefix to Rust builds.
We need to pass --remap-path-prefix to Rust builds to ensure that they
are reproducible across different paths. This adds that for both host
and device builds.
Test: Verify host and device builds are reproducible with different
directories.
Change-Id: I68ba31537b2332fd05613aa0fb00a1502d78e410
diff --git a/rust/config/global.go b/rust/config/global.go
index c66c3c1..ae50804 100644
--- a/rust/config/global.go
+++ b/rust/config/global.go
@@ -37,6 +37,10 @@
DefaultDenyWarnings = proptools.BoolPtr(true)
+ GlobalRustFlags = []string{
+ "--remap-path-prefix $$(pwd)=",
+ }
+
deviceGlobalRustFlags = []string{}
deviceGlobalLinkFlags = []string{