diff --git a/java/dexpreopt.go b/java/dexpreopt.go index 2911fd9b9..c33415ef6 100644 --- a/java/dexpreopt.go +++ b/java/dexpreopt.go @@ -77,10 +77,6 @@ func (d *dexpreopter) dexpreoptDisabled(ctx android.BaseModuleContext) bool { return true } - if ctx.Config().UnbundledBuild() { - return true - } - if d.isTest { return true } diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go index 9d9383814..4096c666b 100644 --- a/java/dexpreopt_bootjars.go +++ b/java/dexpreopt_bootjars.go @@ -179,15 +179,7 @@ func RegisterDexpreoptBootJarsComponents(ctx android.RegistrationContext) { } func skipDexpreoptBootJars(ctx android.PathContext) bool { - if dexpreopt.GetGlobalConfig(ctx).DisablePreopt { - return true - } - - if ctx.Config().UnbundledBuild() { - return true - } - - return false + return dexpreopt.GetGlobalConfig(ctx).DisablePreopt } type dexpreoptBootJars struct { diff --git a/ui/build/config.go b/ui/build/config.go index 49f506ef9..c4bbad76f 100644 --- a/ui/build/config.go +++ b/ui/build/config.go @@ -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_TYPE", "release") c.environ.Unset("TARGET_BUILD_APPS") + c.environ.Unset("TARGET_BUILD_UNBUNDLED") } // Tapas configures the environment to build one or more unbundled apps, diff --git a/ui/build/dumpvars.go b/ui/build/dumpvars.go index 7dc4915e2..e22985675 100644 --- a/ui/build/dumpvars.go +++ b/ui/build/dumpvars.go @@ -143,6 +143,7 @@ var BannerVars = []string{ "TARGET_BUILD_VARIANT", "TARGET_BUILD_TYPE", "TARGET_BUILD_APPS", + "TARGET_BUILD_UNBUNDLED", "TARGET_ARCH", "TARGET_ARCH_VARIANT", "TARGET_CPU_VARIANT", @@ -187,6 +188,7 @@ func runMakeProductConfig(ctx Context, config Config) { "TARGET_PRODUCT", "TARGET_BUILD_VARIANT", "TARGET_BUILD_APPS", + "TARGET_BUILD_UNBUNDLED", // compiler wrappers set up by make "CC_WRAPPER",