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/cc/androidmk.go b/cc/androidmk.go
index ce35b5c..e0e543f 100644
--- a/cc/androidmk.go
+++ b/cc/androidmk.go
@@ -530,9 +530,9 @@
entries.SubName = ""
- if c.isSanitizerEnabled(cfi) {
+ if c.IsSanitizerEnabled(cfi) {
entries.SubName += ".cfi"
- } else if c.isSanitizerEnabled(Hwasan) {
+ } else if c.IsSanitizerEnabled(Hwasan) {
entries.SubName += ".hwasan"
}