Fix handling optimize.enabled from java_defaults
Some module types (`android_test`, etc.) set `optimize.enabled` by
default. If such module happens to have `defaults` attribute which
clears `optimize.enabled`, the latter value is ignored.
Fixes: 129858282
Test: unit tests in java_test.go,
`atest CtsExtendedMockingTestCases` succeeds with aog/936802
reverted (that is, with cts/test/mocking converted to Android.bp)
Change-Id: Ib8e3a0ab0bd489d70ed07f626082aeae31c45e7c
Merged-In: Ib8e3a0ab0bd489d70ed07f626082aeae31c45e7c
(cherry picked from commit 2057f82161
)
This commit is contained in:
committed by
Colin Cross
parent
5c87791a78
commit
4eaeab4442
@@ -171,7 +171,7 @@ func (j *Module) r8Flags(ctx android.ModuleContext, flags javaBuilderFlags) (r8F
|
||||
func (j *Module) compileDex(ctx android.ModuleContext, flags javaBuilderFlags,
|
||||
classesJar android.Path, jarName string) android.ModuleOutPath {
|
||||
|
||||
useR8 := Bool(j.deviceProperties.Optimize.Enabled)
|
||||
useR8 := j.deviceProperties.EffectiveOptimizeEnabled()
|
||||
|
||||
// Compile classes.jar into classes.dex and then javalib.jar
|
||||
javalibJar := android.PathForModuleOut(ctx, "dex", jarName)
|
||||
|
Reference in New Issue
Block a user