Merge "Include symlinks in flattened apexs"

This commit is contained in:
Treehugger Robot 2019-02-25 21:53:41 +00:00 committed by Gerrit Code Review
commit e74c417f81
1 changed files with 7 additions and 1 deletions

View File

@ -1006,7 +1006,10 @@ func (a *apexBundle) buildFlattenedApex(ctx android.ModuleContext) {
if ctx.Config().FlattenApex() {
for _, fi := range a.filesInfo {
dir := filepath.Join("apex", ctx.ModuleName(), fi.installDir)
ctx.InstallFile(android.PathForModuleInstall(ctx, dir), fi.builtFile.Base(), fi.builtFile)
target := ctx.InstallFile(android.PathForModuleInstall(ctx, dir), fi.builtFile.Base(), fi.builtFile)
for _, sym := range fi.symlinks {
ctx.InstallSymlink(android.PathForModuleInstall(ctx, dir), sym, target)
}
}
}
}
@ -1045,6 +1048,9 @@ func (a *apexBundle) androidMkForFiles(w io.Writer, name, moduleDir string, apex
// /system/apex/<name>/{lib|framework|...}
fmt.Fprintln(w, "LOCAL_MODULE_PATH :=", filepath.Join("$(OUT_DIR)",
a.installDir.RelPathString(), name, fi.installDir))
if len(fi.symlinks) > 0 {
fmt.Fprintln(w, "LOCAL_MODULE_SYMLINKS :=", strings.Join(fi.symlinks, " "))
}
} else {
// /apex/<name>/{lib|framework|...}
fmt.Fprintln(w, "LOCAL_MODULE_PATH :=", filepath.Join("$(PRODUCT_OUT)",