Merge "Include shared lib in vendor snapshot if isVndkExt"

This commit is contained in:
Inseob Kim
2020-07-02 07:42:16 +00:00
committed by Gerrit Code Review

View File

@@ -569,7 +569,13 @@ func isVendorSnapshotModule(m *Module, moduleDir string) bool {
return m.outputFile.Valid() && proptools.BoolDefault(m.VendorProperties.Vendor_available, true) return m.outputFile.Valid() && proptools.BoolDefault(m.VendorProperties.Vendor_available, true)
} }
if l.shared() { 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 return true
} }
@@ -669,7 +675,16 @@ func (c *vendorSnapshotSingleton) GenerateBuildActions(ctx android.SingletonCont
// Common properties among snapshots. // Common properties among snapshots.
prop.ModuleName = ctx.ModuleName(m) 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.RuntimeLibs = m.Properties.SnapshotRuntimeLibs
prop.Required = m.RequiredModuleNames() prop.Required = m.RequiredModuleNames()
for _, path := range m.InitRc() { for _, path := range m.InitRc() {