Add USE_D8_DESUGAR option in build/soong

Add an option to use D8's desugar instead of the standalone version.

USE_D8_DESUGAR=true m would trigger DCHECK in dex2oat unless
https://android-review.googlesource.com/c/platform/art/+/562595 is
patched in as well.

Bug: 69329508
Test: m && USE_D8_DESUGAR=false m

Change-Id: I864d88e257a2ba0b7f19aa5cced537301950e963
This commit is contained in:
Alan Leung
2017-11-30 15:50:39 -08:00
parent d4c03092cd
commit 9f319118e1
4 changed files with 90 additions and 15 deletions

View File

@@ -106,6 +106,13 @@ func init() {
return path.String(), nil
}
})
pctx.VariableFunc("D8Cmd", func(config android.Config) (string, error) {
path, err := pctx.HostBinToolPath(config, "d8")
if err != nil {
return "", err
}
return path.String(), nil
})
pctx.VariableFunc("TurbineJar", func(config android.Config) (string, error) {
turbine := "turbine.jar"
if config.UnbundledBuild() {