aboutsummaryrefslogtreecommitdiffstats
path: root/apex
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2019-03-18 14:26:32 +0900
committerJiyong Park <jiyong@google.com>2019-03-20 11:55:04 +0900
commit05e70ddc60c0a2acce6a9f263a5ed0e34fee1172 (patch)
tree8be343a473cb9897c0d3f47f1be9e4e65fd80674 /apex
parentbb3deefa9dd031ce5c6b42278acb0917663bd53a (diff)
downloadbuild_soong-05e70ddc60c0a2acce6a9f263a5ed0e34fee1172.tar.gz
build_soong-05e70ddc60c0a2acce6a9f263a5ed0e34fee1172.tar.bz2
build_soong-05e70ddc60c0a2acce6a9f263a5ed0e34fee1172.zip
Fix the symbol file paths for files in APEXes
This change fixes the problem that symbol files for APEXes are installed to incorrect path when TARGET_FLATTEN_APEX is set to true or the canonical name of an APEX is different fro the module name of the APEX. For the case when TARGET_FLATTEN_APEX is true, LOCAL_SOONG_SYMBOL_PATH is set to point to the runtime path of a file (e.g. /apex/<name>/*). For the case of the different canonical and module names, apex_name property is added to explicitly specify the canonical name Bug: 120846816 Test: m and inspect that symbol files exist under $(PRODUCT_OUT)/symbols/apex/com.android.runtime/ Change-Id: Idfec88d6a30a18c225b0d87b868b9f1e0a617e38
Diffstat (limited to 'apex')
-rw-r--r--apex/apex.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/apex/apex.go b/apex/apex.go
index a70a37be..04b70d44 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -218,6 +218,10 @@ type apexBundleProperties struct {
// If unspecified, a default one is automatically generated.
AndroidManifest *string `android:"path"`
+ // Canonical name of the APEX bundle in the manifest file.
+ // If unspecified, defaults to the value of name
+ Apex_name *string
+
// Determines the file contexts file for setting security context to each file in this APEX bundle.
// Specifically, when this is set to <value>, /system/sepolicy/apex/<value>_file_contexts file is
// used.
@@ -1063,17 +1067,19 @@ func (a *apexBundle) androidMkForFiles(w io.Writer, name, moduleDir string, apex
fmt.Fprintln(w, "\ninclude $(CLEAR_VARS)")
fmt.Fprintln(w, "LOCAL_PATH :=", moduleDir)
fmt.Fprintln(w, "LOCAL_MODULE :=", fi.moduleName)
+ // /apex/<name>/{lib|framework|...}
+ pathWhenActivated := filepath.Join("$(PRODUCT_OUT)", "apex",
+ proptools.StringDefault(a.properties.Apex_name, name), fi.installDir)
if a.flattened && apexType.image() {
// /system/apex/<name>/{lib|framework|...}
fmt.Fprintln(w, "LOCAL_MODULE_PATH :=", filepath.Join("$(OUT_DIR)",
a.installDir.RelPathString(), name, fi.installDir))
+ fmt.Fprintln(w, "LOCAL_SOONG_SYMBOL_PATH :=", pathWhenActivated)
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)",
- "apex", name, fi.installDir))
+ fmt.Fprintln(w, "LOCAL_MODULE_PATH :=", pathWhenActivated)
}
fmt.Fprintln(w, "LOCAL_PREBUILT_MODULE_FILE :=", fi.builtFile.String())
fmt.Fprintln(w, "LOCAL_MODULE_CLASS :=", fi.class.NameInMake())