diff options
author | 2024-02-28 22:21:31 +0000 | |
---|---|---|
committer | 2024-02-28 22:21:31 +0000 | |
commit | ab31c828d7f5a26756925186ddf35c4d1aec87af (patch) | |
tree | 13ae9e7520c1d1dbdc7dc3e56814a43355f8e7f0 /apex/builder.go | |
parent | 88c21f567f743edc98446571885de75ec674a747 (diff) |
Some tweaks to the aconfig flag collection logic
1. Output the aconfig flags pb and storage files to /etc
2. Fix a bug where aconfig flags were not collected for java_sdk_library
Bug: None
Test: manual and unit tests.
Change-Id: I0896e91918c1b53c98ac9dc0f4a636f158200891
Diffstat (limited to 'apex/builder.go')
-rw-r--r-- | apex/builder.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apex/builder.go b/apex/builder.go index e49cf28fd..6ad282ab6 100644 --- a/apex/builder.go +++ b/apex/builder.go @@ -645,6 +645,7 @@ func (a *apexBundle) buildApex(ctx android.ModuleContext) { prebuiltSdkToolsBinDir := filepath.Join("prebuilts", "sdk", "tools", runtime.GOOS, "bin") defaultReadOnlyFiles := []string{"apex_manifest.json", "apex_manifest.pb"} + aconfigDest := imageDir.Join(ctx, "etc").String() if len(a.aconfigFiles) > 0 { apexAconfigFile := android.PathForModuleOut(ctx, "aconfig_flags.pb") ctx.Build(pctx, android.BuildParams{ @@ -657,9 +658,9 @@ func (a *apexBundle) buildApex(ctx android.ModuleContext) { }, }) - copyCommands = append(copyCommands, "cp -f "+apexAconfigFile.String()+" "+imageDir.String()) + copyCommands = append(copyCommands, "cp -f "+apexAconfigFile.String()+" "+aconfigDest) implicitInputs = append(implicitInputs, apexAconfigFile) - defaultReadOnlyFiles = append(defaultReadOnlyFiles, apexAconfigFile.Base()) + defaultReadOnlyFiles = append(defaultReadOnlyFiles, "etc/"+apexAconfigFile.Base()) for _, info := range createStorageInfo { outputFile := android.PathForModuleOut(ctx, info.Output_file) @@ -675,9 +676,9 @@ func (a *apexBundle) buildApex(ctx android.ModuleContext) { }, }) - copyCommands = append(copyCommands, "cp -f "+outputFile.String()+" "+imageDir.String()) + copyCommands = append(copyCommands, "cp -f "+outputFile.String()+" "+aconfigDest) implicitInputs = append(implicitInputs, outputFile) - defaultReadOnlyFiles = append(defaultReadOnlyFiles, outputFile.Base()) + defaultReadOnlyFiles = append(defaultReadOnlyFiles, "etc/"+outputFile.Base()) } } |