diff options
| author | 2019-12-30 11:12:55 +0900 | |
|---|---|---|
| committer | 2019-12-30 14:29:52 +0900 | |
| commit | e1aa8ea34ed59fece04238596a80c3d0231d69b7 (patch) | |
| tree | cfd4c91931aee9fe3df70f16dfa4271f257691ca | |
| parent | fb1e5fbf13a546bae2f1d001fb2c916e54cd843a (diff) | |
Detach VNDK using core library list from VNDK APEX
Some devices require VNDK using core library list, but this is dependent
to system image rather than VNDK version. This change removes VNDK using
core variant library list file from VNDK APEX, and also remove VNDK
version from its filename.
Bug: 142599349
Test: m -j passed && aosp_cf_x86_go_phone booted
Change-Id: Ibc53b8dfc9d38e14bbaa878154034d25a6d34089
| -rw-r--r-- | apex/apex_test.go | 3 | ||||
| -rw-r--r-- | cc/cc_test.go | 9 | ||||
| -rw-r--r-- | cc/vndk.go | 11 |
3 files changed, 17 insertions, 6 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go index 97600b6c5..add07a6ba 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -1626,7 +1626,6 @@ func TestVndkApexCurrent(t *testing.T) { "etc/vndkcore.libraries.VER.txt", "etc/vndksp.libraries.VER.txt", "etc/vndkprivate.libraries.VER.txt", - "etc/vndkcorevariant.libraries.VER.txt", }) } @@ -1687,7 +1686,7 @@ func TestVndkApexWithPrebuilt(t *testing.T) { func vndkLibrariesTxtFiles(vers ...string) (result string) { for _, v := range vers { if v == "current" { - for _, txt := range []string{"llndk", "vndkcore", "vndksp", "vndkprivate", "vndkcorevariant"} { + for _, txt := range []string{"llndk", "vndkcore", "vndksp", "vndkprivate"} { result += ` vndk_libraries_txt { name: "` + txt + `.libraries.txt", diff --git a/cc/cc_test.go b/cc/cc_test.go index 1e70529bf..4d02f4f62 100644 --- a/cc/cc_test.go +++ b/cc/cc_test.go @@ -295,7 +295,14 @@ func checkVndkOutput(t *testing.T, ctx *android.TestContext, output string, expe func checkVndkLibrariesOutput(t *testing.T, ctx *android.TestContext, module string, expected []string) { t.Helper() vndkLibraries := ctx.ModuleForTests(module, "") - output := insertVndkVersion(module, "VER") + + var output string + if module != "vndkcorevariant.libraries.txt" { + output = insertVndkVersion(module, "VER") + } else { + output = module + } + checkWriteFileOutput(t, vndkLibraries.Output(output), expected) } diff --git a/cc/vndk.go b/cc/vndk.go index e4453eb2f..872a473a6 100644 --- a/cc/vndk.go +++ b/cc/vndk.go @@ -42,7 +42,6 @@ func VndkLibrariesTxtModules(vndkVersion string) []string { vndkCoreLibrariesTxt, vndkSpLibrariesTxt, vndkPrivateLibrariesTxt, - vndkUsingCoreVariantLibrariesTxt, } } // Snapshot vndks have their own *.libraries.VER.txt files. @@ -227,7 +226,7 @@ var ( vndkSpLibrariesKey = android.NewOnceKey("vndkSpLibrarires") llndkLibrariesKey = android.NewOnceKey("llndkLibrarires") vndkPrivateLibrariesKey = android.NewOnceKey("vndkPrivateLibrarires") - vndkUsingCoreVariantLibrariesKey = android.NewOnceKey("vndkUsingCoreVariantLibrarires") + vndkUsingCoreVariantLibrariesKey = android.NewOnceKey("vndkUsingCoreVariantLibraries") vndkMustUseVendorVariantListKey = android.NewOnceKey("vndkMustUseVendorVariantListKey") vndkLibrariesLock sync.Mutex @@ -445,7 +444,13 @@ func (txt *vndkLibrariesTxt) GenerateAndroidBuildActions(ctx android.ModuleConte return } - filename := insertVndkVersion(txt.Name(), ctx.DeviceConfig().PlatformVndkVersion()) + var filename string + if txt.Name() != vndkUsingCoreVariantLibrariesTxt { + filename = insertVndkVersion(txt.Name(), ctx.DeviceConfig().PlatformVndkVersion()) + } else { + filename = txt.Name() + } + txt.outputFile = android.PathForModuleOut(ctx, filename).OutputPath ctx.Build(pctx, android.BuildParams{ Rule: android.WriteFile, |