diff options
Diffstat (limited to 'build/art.go')
| -rw-r--r-- | build/art.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/build/art.go b/build/art.go index 58df11ca5e..bf6eee6c41 100644 --- a/build/art.go +++ b/build/art.go @@ -103,7 +103,7 @@ func globalFlags(ctx android.BaseContext) ([]string, []string) { 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 envTrue(ctx android.BaseContext, key string) bool { 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" +} |