Merge "Package dexpreopt artifacts for libcore jars in the ART apex."
This commit is contained in:
17
apex/apex.go
17
apex/apex.go
@@ -613,6 +613,7 @@ type apexBundle struct {
|
||||
|
||||
testApex bool
|
||||
vndkApex bool
|
||||
artApex bool
|
||||
|
||||
// intermediate path for apex_manifest.json
|
||||
manifestOut android.WritablePath
|
||||
@@ -1226,6 +1227,19 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
return false
|
||||
})
|
||||
|
||||
// Specific to the ART apex: dexpreopt artifacts for libcore Java libraries.
|
||||
// Build rules are generated by the dexpreopt singleton, and here we access build artifacts
|
||||
// via the global boot image config.
|
||||
if a.artApex {
|
||||
for arch, files := range java.DexpreoptedArtApexJars(ctx) {
|
||||
dirInApex := filepath.Join("dexpreopt", arch.String())
|
||||
for _, f := range files {
|
||||
localModule := "dexpreopt_" + arch.String() + "_" + filepath.Base(f.String())
|
||||
filesInfo = append(filesInfo, apexFile{f, localModule, dirInApex, etc, nil, nil})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if a.private_key_file == nil {
|
||||
ctx.PropertyErrorf("key", "private_key for %q could not be found", String(a.properties.Key))
|
||||
return
|
||||
@@ -1826,9 +1840,10 @@ func newApexBundle() *apexBundle {
|
||||
return module
|
||||
}
|
||||
|
||||
func ApexBundleFactory(testApex bool) android.Module {
|
||||
func ApexBundleFactory(testApex bool, artApex bool) android.Module {
|
||||
bundle := newApexBundle()
|
||||
bundle.testApex = testApex
|
||||
bundle.artApex = artApex
|
||||
return bundle
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user