aboutsummaryrefslogtreecommitdiffstats
path: root/apex
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2019-02-22 13:00:04 -0800
committerAlex Light <allight@google.com>2019-02-25 10:14:55 -0800
commitf4857cf3dd412e9d85612a43ec43a66da3913266 (patch)
treea4dbb33716dbcf93d432c76620e36963635cfcd5 /apex
parente608a51b06031d3765541859068a2be298d19374 (diff)
downloadbuild_soong-f4857cf3dd412e9d85612a43ec43a66da3913266.tar.gz
build_soong-f4857cf3dd412e9d85612a43ec43a66da3913266.tar.bz2
build_soong-f4857cf3dd412e9d85612a43ec43a66da3913266.zip
Include symlinks in flattened apexs
Flattened apexs were not including symlinks. This could cause expected files not to be present. Test: lunch aosp_marlin-userdebug m droid stat $OUT/system/apex/com.android.runtime.debug/bin/dalvikvm Bug: 124924906 Change-Id: I04e696602b776b383bf7198eb19220353df74192
Diffstat (limited to 'apex')
-rw-r--r--apex/apex.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/apex/apex.go b/apex/apex.go
index 8f89ca6e..9ab51875 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -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)",