Generate system stub library list at build time
List of stub libraries from system (and bionic APEX) is currently
managed in static file. This change generates the list at build time and
adds to the system config so linkerconfig can use it.
Bug: 172889962
Test: Build cuttlefish and confirmed list is generated in
/system/etc/linker.config.pb
Change-Id: Ie0400e9d1098b0de19c6a7c25f261384aadde0a3
diff --git a/android/packaging.go b/android/packaging.go
index a106997..aac3219 100644
--- a/android/packaging.go
+++ b/android/packaging.go
@@ -40,6 +40,15 @@
executable bool
}
+// Get file name of installed package
+func (p *PackagingSpec) FileName() string {
+ if p.relPathInPackage != "" {
+ return filepath.Base(p.relPathInPackage)
+ }
+
+ return ""
+}
+
type PackageModule interface {
Module
packagingBase() *PackagingBase