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
diff --git a/cc/vndk_prebuilt.go b/cc/vndk_prebuilt.go
index fc4412a..141f438 100644
--- a/cc/vndk_prebuilt.go
+++ b/cc/vndk_prebuilt.go
@@ -82,7 +82,7 @@
}
func (p *vndkPrebuiltLibraryDecorator) NameSuffix() string {
- suffix := p.version()
+ suffix := p.Version()
if p.arch() != "" {
suffix += "." + p.arch()
}
@@ -92,7 +92,7 @@
return vndkSuffix + suffix
}
-func (p *vndkPrebuiltLibraryDecorator) version() string {
+func (p *vndkPrebuiltLibraryDecorator) Version() string {
return String(p.properties.Version)
}
@@ -107,7 +107,7 @@
return "64"
}
-func (p *vndkPrebuiltLibraryDecorator) snapshotAndroidMkSuffix() string {
+func (p *vndkPrebuiltLibraryDecorator) SnapshotAndroidMkSuffix() string {
return ".vendor"
}
@@ -133,7 +133,7 @@
func (p *vndkPrebuiltLibraryDecorator) link(ctx ModuleContext,
flags Flags, deps PathDeps, objs Objects) android.Path {
- if !p.matchesWithDevice(ctx.DeviceConfig()) {
+ if !p.MatchesWithDevice(ctx.DeviceConfig()) {
ctx.Module().HideFromMake()
return nil
}
@@ -163,7 +163,7 @@
p.androidMkSuffix = p.NameSuffix()
vndkVersion := ctx.DeviceConfig().VndkVersion()
- if vndkVersion == p.version() {
+ if vndkVersion == p.Version() {
p.androidMkSuffix = ""
}
@@ -184,7 +184,7 @@
return nil
}
-func (p *vndkPrebuiltLibraryDecorator) matchesWithDevice(config android.DeviceConfig) bool {
+func (p *vndkPrebuiltLibraryDecorator) MatchesWithDevice(config android.DeviceConfig) bool {
arches := config.Arches()
if len(arches) == 0 || arches[0].ArchType.String() != p.arch() {
return false
@@ -202,7 +202,7 @@
return false
}
-func (p *vndkPrebuiltLibraryDecorator) isSnapshotPrebuilt() bool {
+func (p *vndkPrebuiltLibraryDecorator) IsSnapshotPrebuilt() bool {
return true
}