Merge changes from topics "target-build-unbundled", "unbundled-preopt"

* changes:
  Don't disable dexpreopting implicitly in unbundled builds.
  Add TARGET_BUILD_UNBUNDLED as a variable to control builds.
This commit is contained in:
Martin Stjernholm
2020-06-11 10:01:59 +00:00
committed by Gerrit Code Review
4 changed files with 4 additions and 13 deletions

View File

@@ -77,10 +77,6 @@ func (d *dexpreopter) dexpreoptDisabled(ctx android.BaseModuleContext) bool {
return true return true
} }
if ctx.Config().UnbundledBuild() {
return true
}
if d.isTest { if d.isTest {
return true return true
} }

View File

@@ -179,15 +179,7 @@ func RegisterDexpreoptBootJarsComponents(ctx android.RegistrationContext) {
} }
func skipDexpreoptBootJars(ctx android.PathContext) bool { func skipDexpreoptBootJars(ctx android.PathContext) bool {
if dexpreopt.GetGlobalConfig(ctx).DisablePreopt { return dexpreopt.GetGlobalConfig(ctx).DisablePreopt
return true
}
if ctx.Config().UnbundledBuild() {
return true
}
return false
} }
type dexpreoptBootJars struct { type dexpreoptBootJars struct {

View File

@@ -592,6 +592,7 @@ func (c *configImpl) Lunch(ctx Context, product, variant string) {
c.environ.Set("TARGET_BUILD_VARIANT", variant) c.environ.Set("TARGET_BUILD_VARIANT", variant)
c.environ.Set("TARGET_BUILD_TYPE", "release") c.environ.Set("TARGET_BUILD_TYPE", "release")
c.environ.Unset("TARGET_BUILD_APPS") c.environ.Unset("TARGET_BUILD_APPS")
c.environ.Unset("TARGET_BUILD_UNBUNDLED")
} }
// Tapas configures the environment to build one or more unbundled apps, // Tapas configures the environment to build one or more unbundled apps,

View File

@@ -143,6 +143,7 @@ var BannerVars = []string{
"TARGET_BUILD_VARIANT", "TARGET_BUILD_VARIANT",
"TARGET_BUILD_TYPE", "TARGET_BUILD_TYPE",
"TARGET_BUILD_APPS", "TARGET_BUILD_APPS",
"TARGET_BUILD_UNBUNDLED",
"TARGET_ARCH", "TARGET_ARCH",
"TARGET_ARCH_VARIANT", "TARGET_ARCH_VARIANT",
"TARGET_CPU_VARIANT", "TARGET_CPU_VARIANT",
@@ -187,6 +188,7 @@ func runMakeProductConfig(ctx Context, config Config) {
"TARGET_PRODUCT", "TARGET_PRODUCT",
"TARGET_BUILD_VARIANT", "TARGET_BUILD_VARIANT",
"TARGET_BUILD_APPS", "TARGET_BUILD_APPS",
"TARGET_BUILD_UNBUNDLED",
// compiler wrappers set up by make // compiler wrappers set up by make
"CC_WRAPPER", "CC_WRAPPER",