aboutsummaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorBill Peckham <bpeckham@google.com>2020-06-29 16:49:15 -0700
committerInseob Kim <inseob@google.com>2020-06-30 19:21:53 +0900
commitf99b355c0ab24a795c0956351cf5a05409e9c519 (patch)
tree8a00ef2b334a3dcece37dcb98001c25cec356424 /cc
parentc4422106a7cf4731e27d664646bc0d57ad3f37fa (diff)
downloadbuild_soong-f99b355c0ab24a795c0956351cf5a05409e9c519.tar.gz
build_soong-f99b355c0ab24a795c0956351cf5a05409e9c519.tar.bz2
build_soong-f99b355c0ab24a795c0956351cf5a05409e9c519.zip
Include shared lib in vendor snapshot if isVndkExt
A VDNK extension is an image:vendor module provided by a vendor-modified framework project. So it should be provided to the vendor build as a prebuilt (for the purposes of building against a vendor snapshot). Bug: 160189878 Test: manual Change-Id: I3eb4794c1be2949b9c85fd52f823e5e14df4ad7d
Diffstat (limited to 'cc')
-rw-r--r--cc/vendor_snapshot.go19
1 files changed, 17 insertions, 2 deletions
diff --git a/cc/vendor_snapshot.go b/cc/vendor_snapshot.go
index b89640a8..b11b1a82 100644
--- a/cc/vendor_snapshot.go
+++ b/cc/vendor_snapshot.go
@@ -569,7 +569,13 @@ func isVendorSnapshotModule(m *Module, moduleDir string) bool {
return m.outputFile.Valid() && proptools.BoolDefault(m.VendorProperties.Vendor_available, true)
}
if l.shared() {
- return m.outputFile.Valid() && !m.IsVndk()
+ if !m.outputFile.Valid() {
+ return false
+ }
+ if !m.IsVndk() {
+ return true
+ }
+ return m.isVndkExt()
}
return true
}
@@ -669,7 +675,16 @@ func (c *vendorSnapshotSingleton) GenerateBuildActions(ctx android.SingletonCont
// Common properties among snapshots.
prop.ModuleName = ctx.ModuleName(m)
- prop.RelativeInstallPath = m.RelativeInstallPath()
+ if m.isVndkExt() {
+ // vndk exts are installed to /vendor/lib(64)?/vndk(-sp)?
+ if m.isVndkSp() {
+ prop.RelativeInstallPath = "vndk-sp"
+ } else {
+ prop.RelativeInstallPath = "vndk"
+ }
+ } else {
+ prop.RelativeInstallPath = m.RelativeInstallPath()
+ }
prop.RuntimeLibs = m.Properties.SnapshotRuntimeLibs
prop.Required = m.RequiredModuleNames()
for _, path := range m.InitRc() {