Fix the make name of rust snapshots
Rust snapshot must have proper suffix for androidmk to avoid conflict
with the existing modules.
Bug: 230780263
Bug: 235895567
Test: m nothing
Change-Id: I35794196553621cd722c067d7965b2a61aa351bd
diff --git a/cc/cc.go b/cc/cc.go
index 0e88c56..c5dff1d 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -3475,7 +3475,6 @@
nonSystemVariantsExist := ccDep.HasNonSystemVariants() || isLLndk
if ccDepModule != nil {
- // TODO(ivanlozano) Support snapshots for Rust-produced C library variants.
// Use base module name for snapshots when exporting to Makefile.
if snapshotPrebuilt, ok := ccDepModule.linker.(SnapshotInterface); ok {
baseName := ccDepModule.BaseModuleName()
diff --git a/cc/snapshot_prebuilt.go b/cc/snapshot_prebuilt.go
index 32878ca..bb6e257 100644
--- a/cc/snapshot_prebuilt.go
+++ b/cc/snapshot_prebuilt.go
@@ -522,6 +522,8 @@
return false
}
+var _ snapshotSanitizer = (*snapshotLibraryDecorator)(nil)
+
func (p *snapshotLibraryDecorator) isSanitizerAvailable(t SanitizerType) bool {
switch t {
case cfi:
@@ -644,8 +646,6 @@
return module.Init()
}
-var _ snapshotSanitizer = (*snapshotLibraryDecorator)(nil)
-
// Module definitions for snapshots of executable binaries.
//
// Modules (vendor|recovery)_snapshot_binary are defined here. They have their prebuilt executable