Merge "Detach VNDK using core library list from VNDK APEX" am: 2c12207919
am: 1290b12a30
Change-Id: I5169d33ce32124cb15dc213e3b03456f964aec50
This commit is contained in:
@@ -1640,7 +1640,6 @@ func TestVndkApexCurrent(t *testing.T) {
|
|||||||
"etc/vndkcore.libraries.VER.txt",
|
"etc/vndkcore.libraries.VER.txt",
|
||||||
"etc/vndksp.libraries.VER.txt",
|
"etc/vndksp.libraries.VER.txt",
|
||||||
"etc/vndkprivate.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) {
|
func vndkLibrariesTxtFiles(vers ...string) (result string) {
|
||||||
for _, v := range vers {
|
for _, v := range vers {
|
||||||
if v == "current" {
|
if v == "current" {
|
||||||
for _, txt := range []string{"llndk", "vndkcore", "vndksp", "vndkprivate", "vndkcorevariant"} {
|
for _, txt := range []string{"llndk", "vndkcore", "vndksp", "vndkprivate"} {
|
||||||
result += `
|
result += `
|
||||||
vndk_libraries_txt {
|
vndk_libraries_txt {
|
||||||
name: "` + txt + `.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) {
|
func checkVndkLibrariesOutput(t *testing.T, ctx *android.TestContext, module string, expected []string) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
vndkLibraries := ctx.ModuleForTests(module, "")
|
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)
|
checkWriteFileOutput(t, vndkLibraries.Output(output), expected)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
11
cc/vndk.go
11
cc/vndk.go
@@ -42,7 +42,6 @@ func VndkLibrariesTxtModules(vndkVersion string) []string {
|
|||||||
vndkCoreLibrariesTxt,
|
vndkCoreLibrariesTxt,
|
||||||
vndkSpLibrariesTxt,
|
vndkSpLibrariesTxt,
|
||||||
vndkPrivateLibrariesTxt,
|
vndkPrivateLibrariesTxt,
|
||||||
vndkUsingCoreVariantLibrariesTxt,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Snapshot vndks have their own *.libraries.VER.txt files.
|
// Snapshot vndks have their own *.libraries.VER.txt files.
|
||||||
@@ -227,7 +226,7 @@ var (
|
|||||||
vndkSpLibrariesKey = android.NewOnceKey("vndkSpLibrarires")
|
vndkSpLibrariesKey = android.NewOnceKey("vndkSpLibrarires")
|
||||||
llndkLibrariesKey = android.NewOnceKey("llndkLibrarires")
|
llndkLibrariesKey = android.NewOnceKey("llndkLibrarires")
|
||||||
vndkPrivateLibrariesKey = android.NewOnceKey("vndkPrivateLibrarires")
|
vndkPrivateLibrariesKey = android.NewOnceKey("vndkPrivateLibrarires")
|
||||||
vndkUsingCoreVariantLibrariesKey = android.NewOnceKey("vndkUsingCoreVariantLibrarires")
|
vndkUsingCoreVariantLibrariesKey = android.NewOnceKey("vndkUsingCoreVariantLibraries")
|
||||||
vndkMustUseVendorVariantListKey = android.NewOnceKey("vndkMustUseVendorVariantListKey")
|
vndkMustUseVendorVariantListKey = android.NewOnceKey("vndkMustUseVendorVariantListKey")
|
||||||
vndkLibrariesLock sync.Mutex
|
vndkLibrariesLock sync.Mutex
|
||||||
|
|
||||||
@@ -445,7 +444,13 @@ func (txt *vndkLibrariesTxt) GenerateAndroidBuildActions(ctx android.ModuleConte
|
|||||||
return
|
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
|
txt.outputFile = android.PathForModuleOut(ctx, filename).OutputPath
|
||||||
ctx.Build(pctx, android.BuildParams{
|
ctx.Build(pctx, android.BuildParams{
|
||||||
Rule: android.WriteFile,
|
Rule: android.WriteFile,
|
||||||
|
Reference in New Issue
Block a user