Merge "Detach VNDK using core library list from VNDK APEX"
This commit is contained in:
@@ -1640,7 +1640,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",
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1701,7 +1700,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",
|
||||
|
@@ -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)
|
||||
}
|
||||
|
||||
|
11
cc/vndk.go
11
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,
|
||||
|
Reference in New Issue
Block a user