Make D8 Desugaring default.
Bug: 69329508
Test: m checkbuild
Change-Id: I25218efd33885a0b8c11858ccabeb4cfce4302bf
diff --git a/build/art.go b/build/art.go
index 58df11c..bf6eee6 100644
--- a/build/art.go
+++ b/build/art.go
@@ -103,7 +103,7 @@
asflags = append(asflags, "-DART_MIPS32_CHECK_ALIGNMENT")
}
- if envTrue(ctx, "USE_D8_DESUGAR") {
+ if envTrueOrDefault(ctx, "USE_D8_DESUGAR") {
cflags = append(cflags, "-DUSE_D8_DESUGAR=1")
}
@@ -370,3 +370,7 @@
func envFalse(ctx android.BaseContext, key string) bool {
return ctx.AConfig().Getenv(key) == "false"
}
+
+func envTrueOrDefault(ctx android.BaseContext, key string) bool {
+ return ctx.AConfig().Getenv(key) != "false"
+}