Export cc functions for snapshotting Rust rlibs.
Export additional fuctions, structs, and interfaces from cc for use in the rust package to allow for rlib snapshotting. Bug: 184042776 Test: m nothing Change-Id: I4c53b9378d5d5b5973dbd23ab692cdfb2ede60b9
This commit is contained in:
8
cc/cc.go
8
cc/cc.go
@@ -1267,8 +1267,8 @@ func (c *Module) nativeCoverage() bool {
|
||||
}
|
||||
|
||||
func (c *Module) IsSnapshotPrebuilt() bool {
|
||||
if p, ok := c.linker.(snapshotInterface); ok {
|
||||
return p.isSnapshotPrebuilt()
|
||||
if p, ok := c.linker.(SnapshotInterface); ok {
|
||||
return p.IsSnapshotPrebuilt()
|
||||
}
|
||||
return false
|
||||
}
|
||||
@@ -2946,10 +2946,10 @@ func MakeLibName(ctx android.ModuleContext, c LinkableInterface, ccDep LinkableI
|
||||
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 {
|
||||
if snapshotPrebuilt, ok := ccDepModule.linker.(SnapshotInterface); ok {
|
||||
baseName := ccDepModule.BaseModuleName()
|
||||
|
||||
return baseName + snapshotPrebuilt.snapshotAndroidMkSuffix()
|
||||
return baseName + snapshotPrebuilt.SnapshotAndroidMkSuffix()
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user