diff options
author | 2024-09-04 14:16:47 +0900 | |
---|---|---|
committer | 2025-02-10 17:04:24 -0800 | |
commit | 11ad4e940b342fb0bdf700276f9a7b513c3656b0 (patch) | |
tree | 0a894ae448f961be44c89230cbc4375d8e844e65 /apex/builder.go | |
parent | 4fe00974d9ebaf6eaf9e1b6c41c39e290e74cfe9 (diff) |
Install VINTF fragment modules in the APEX
Currently APEX ignores vintf_fragments modules within the APEX, and all
VINTF fragments are installed with prebuilt_etc modules. This change
installs vintf_fragment modules in the APEX, so any additional
prebuilt_etc modules are not required as long as binaries define
vintf_fragment_modules references.
Bug: 363105686
Test: AOSP CF x86_64 build succeeded
Change-Id: I33b58178cd51dc2c4bb9226fdd68e7990dccd6a2
Merged-In: I33b58178cd51dc2c4bb9226fdd68e7990dccd6a2
Diffstat (limited to 'apex/builder.go')
-rw-r--r-- | apex/builder.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apex/builder.go b/apex/builder.go index b40fd0991..63efa6332 100644 --- a/apex/builder.go +++ b/apex/builder.go @@ -528,9 +528,10 @@ func markManifestTestOnly(ctx android.ModuleContext, androidManifestFile android }) } -func isVintfFragment(fi apexFile) bool { +func shouldApplyAssembleVintf(fi apexFile) bool { isVintfFragment, _ := path.Match("etc/vintf/*", fi.path()) - return isVintfFragment + _, fromVintfFragmentModule := fi.module.(*android.VintfFragmentModule) + return isVintfFragment && !fromVintfFragmentModule } func runAssembleVintf(ctx android.ModuleContext, vintfFragment android.Path) android.Path { @@ -639,7 +640,7 @@ func (a *apexBundle) buildApex(ctx android.ModuleContext) { copyCommands = append(copyCommands, "ln -sfn "+pathOnDevice+" "+destPath) } else { // Copy the file into APEX - if !a.testApex && isVintfFragment(fi) { + if !a.testApex && shouldApplyAssembleVintf(fi) { // copy the output of assemble_vintf instead of the original vintfFragment := runAssembleVintf(ctx, fi.builtFile) copyCommands = append(copyCommands, "cp -f "+vintfFragment.String()+" "+destPath) |