Prep D8 default instead of CompatDX in build/soong
Bug: 69329508 Test: m checkbuild tests Change-Id: Ibaa2d787c644cf25104af78305a6eed16028dcf0
This commit is contained in:
parent
b267295324
commit
c37c6343e2
|
@ -584,6 +584,10 @@ func (c *config) Android64() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *config) UseD8Desugar() bool {
|
||||||
|
return c.IsEnvTrue("USE_D8_DESUGAR")
|
||||||
|
}
|
||||||
|
|
||||||
func (c *config) UseGoma() bool {
|
func (c *config) UseGoma() bool {
|
||||||
return Bool(c.ProductVariables.UseGoma)
|
return Bool(c.ProductVariables.UseGoma)
|
||||||
}
|
}
|
||||||
|
|
|
@ -441,7 +441,7 @@ func TransformClassesJarToDexJar(ctx android.ModuleContext, outputFile android.W
|
||||||
|
|
||||||
rule := dx
|
rule := dx
|
||||||
desc := "dx"
|
desc := "dx"
|
||||||
if ctx.AConfig().IsEnvTrue("USE_D8_DESUGAR") {
|
if ctx.Config().UseD8Desugar() {
|
||||||
rule = d8
|
rule = d8
|
||||||
desc = "d8"
|
desc = "d8"
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,12 +46,14 @@ func makeVarsProvider(ctx android.MakeVarsContext) {
|
||||||
ctx.Strict("JAVADOC", "${JavadocCmd}")
|
ctx.Strict("JAVADOC", "${JavadocCmd}")
|
||||||
ctx.Strict("COMMON_JDK_FLAGS", "${CommonJdkFlags}")
|
ctx.Strict("COMMON_JDK_FLAGS", "${CommonJdkFlags}")
|
||||||
|
|
||||||
if ctx.Config().IsEnvTrue("USE_D8_DESUGAR") {
|
if ctx.Config().UseD8Desugar() {
|
||||||
ctx.Strict("DX", "${D8Cmd}")
|
ctx.Strict("DX", "${D8Cmd}")
|
||||||
ctx.Strict("DX_COMMAND", "${D8Cmd} -JXms16M -JXmx2048M")
|
ctx.Strict("DX_COMMAND", "${D8Cmd} -JXms16M -JXmx2048M")
|
||||||
|
ctx.Strict("USE_D8_DESUGAR", "true")
|
||||||
} else {
|
} else {
|
||||||
ctx.Strict("DX", "${DxCmd}")
|
ctx.Strict("DX", "${DxCmd}")
|
||||||
ctx.Strict("DX_COMMAND", "${DxCmd} -JXms16M -JXmx2048M")
|
ctx.Strict("DX_COMMAND", "${DxCmd} -JXms16M -JXmx2048M")
|
||||||
|
ctx.Strict("USE_D8_DESUGAR", "false")
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.Strict("TURBINE", "${TurbineJar}")
|
ctx.Strict("TURBINE", "${TurbineJar}")
|
||||||
|
|
|
@ -677,7 +677,7 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path
|
||||||
// Store the list of .java files that was passed to javac
|
// Store the list of .java files that was passed to javac
|
||||||
j.compiledJavaSrcs = uniqueSrcFiles
|
j.compiledJavaSrcs = uniqueSrcFiles
|
||||||
j.compiledSrcJars = srcJars
|
j.compiledSrcJars = srcJars
|
||||||
fullD8 := ctx.AConfig().IsEnvTrue("USE_D8_DESUGAR")
|
fullD8 := ctx.Config().UseD8Desugar()
|
||||||
|
|
||||||
enable_sharding := false
|
enable_sharding := false
|
||||||
if ctx.Device() && !ctx.Config().IsEnvFalse("TURBINE_ENABLED") {
|
if ctx.Device() && !ctx.Config().IsEnvFalse("TURBINE_ENABLED") {
|
||||||
|
|
Loading…
Reference in New Issue