Merge "Fix symlinks to system libs for flattened apex" am: 8c94763bf7 am: e345c2a45d

Change-Id: I11a31140ed79356bf01cbf22cc5d4ba1bd31b09e
This commit is contained in:
Automerger Merge Worker
2020-01-24 09:01:25 +00:00

View File

@@ -63,7 +63,6 @@ func (a *apexBundle) androidMkForFiles(w io.Writer, apexName, moduleDir string)
postInstallCommands = append(postInstallCommands, mkdirCmd, linkCmd) postInstallCommands = append(postInstallCommands, mkdirCmd, linkCmd)
} }
} }
postInstallCommands = append(postInstallCommands, a.compatSymlinks...)
for _, fi := range a.filesInfo { for _, fi := range a.filesInfo {
if cc, ok := fi.module.(*cc.Module); ok && cc.Properties.HideFromMake { if cc, ok := fi.module.(*cc.Module); ok && cc.Properties.HideFromMake {
@@ -178,17 +177,22 @@ func (a *apexBundle) androidMkForFiles(w io.Writer, apexName, moduleDir string)
fmt.Fprintln(w, "include $(BUILD_SYSTEM)/soong_cc_prebuilt.mk") fmt.Fprintln(w, "include $(BUILD_SYSTEM)/soong_cc_prebuilt.mk")
} else { } else {
fmt.Fprintln(w, "LOCAL_MODULE_STEM :=", fi.builtFile.Base()) fmt.Fprintln(w, "LOCAL_MODULE_STEM :=", fi.builtFile.Base())
if a.primaryApexType && fi.builtFile == a.manifestPbOut { if fi.builtFile == a.manifestPbOut {
// Make apex_manifest.pb module for this APEX to override all other if a.primaryApexType {
// modules in the APEXes being overridden by this APEX // Make apex_manifest.pb module for this APEX to override all other
var patterns []string // modules in the APEXes being overridden by this APEX
for _, o := range a.overridableProperties.Overrides { var patterns []string
patterns = append(patterns, "%."+o+a.suffix) for _, o := range a.overridableProperties.Overrides {
} patterns = append(patterns, "%."+o+a.suffix)
fmt.Fprintln(w, "LOCAL_OVERRIDES_MODULES :=", strings.Join(patterns, " ")) }
fmt.Fprintln(w, "LOCAL_OVERRIDES_MODULES :=", strings.Join(patterns, " "))
if apexType == flattenedApex && len(postInstallCommands) > 0 { if apexType == flattenedApex && len(a.compatSymlinks) > 0 {
// For flattened apexes, compat symlinks are attached to apex_manifest.json which is guaranteed for every apex // For flattened apexes, compat symlinks are attached to apex_manifest.json which is guaranteed for every apex
postInstallCommands = append(postInstallCommands, a.compatSymlinks...)
}
}
if len(postInstallCommands) > 0 {
fmt.Fprintln(w, "LOCAL_POST_INSTALL_CMD :=", strings.Join(postInstallCommands, " && ")) fmt.Fprintln(w, "LOCAL_POST_INSTALL_CMD :=", strings.Join(postInstallCommands, " && "))
} }
} }