rust: Rust sanitized snapshots variations
This adds support for correctly handling Rust sanitized snapshots,
ensuring they only have one variation.
The presence of multiple variations were causing build failures
when a rust_fuzz module for host was defined and a snapshot
build was requested.
This also sets -Z link-native-libraries=no on host modules
(in addition to device modules) to avoid emitting extra linkage
flags due to link attributes.
Bug: 282897366
Test: SOONG_SDK_SNAPSHOT_USE_SRCJAR=true m
Change-Id: Idf980c29145f11c530ad635a4eb5b01a1730ac24
diff --git a/rust/config/global.go b/rust/config/global.go
index ca2c9af..4bd495d 100644
--- a/rust/config/global.go
+++ b/rust/config/global.go
@@ -54,11 +54,11 @@
"-C symbol-mangling-version=v0",
"--color always",
"-Zdylib-lto",
+ "-Z link-native-libraries=no",
}
deviceGlobalRustFlags = []string{
"-C panic=abort",
- "-Z link-native-libraries=no",
// Generate additional debug info for AutoFDO
"-Z debug-info-for-profiling",
}