Allow using updatable boot jars in dexpreopt (but don't use them yet).
This CL handles updatable boot jars in the same hacky way as we handle non-updatable boot jars: it creates a set of predefined paths to the dex jars in a global config, then traverses all modules in a singleton context, finds updatable boot jars and adds copy rules from these jars to the predefined paths. A proper way would be to register dependencies of the dexpreopted modules on the boot jars and extracting paths to dex files by walking these dependencies. Bug: 178467404 Test: lunch aosp_cf_x86_64_phone-userdebug && m Test: added new Soong test Change-Id: I87f764109315f79315d73bf43799b70eb010fc0b
This commit is contained in:
@@ -78,3 +78,17 @@ func FixtureSetBootJars(bootJars ...string) android.FixturePreparer {
|
||||
dexpreoptConfig.BootJars = android.CreateTestConfiguredJarList(bootJars)
|
||||
})
|
||||
}
|
||||
|
||||
// FixtureSetUpdatableBootJars sets the UpdatableBootJars property in the global config.
|
||||
func FixtureSetUpdatableBootJars(bootJars ...string) android.FixturePreparer {
|
||||
return FixtureModifyGlobalConfig(func(dexpreoptConfig *GlobalConfig) {
|
||||
dexpreoptConfig.UpdatableBootJars = android.CreateTestConfiguredJarList(bootJars)
|
||||
})
|
||||
}
|
||||
|
||||
// FixtureSetPreoptWithUpdatableBcp sets the PreoptWithUpdatableBcp property in the global config.
|
||||
func FixtureSetPreoptWithUpdatableBcp(value bool) android.FixturePreparer {
|
||||
return FixtureModifyGlobalConfig(func(dexpreoptConfig *GlobalConfig) {
|
||||
dexpreoptConfig.PreoptWithUpdatableBcp = value
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user