Always use installed version of d8-compat-dx
Also adapt to the renaming of d8 to d8-compat-dx. Test: USE_D8=true m -j16 PRODUCT-aosp_arm64-eng showcommands core-oj Change-Id: Ic7aaa6a5da34a6a5706c20f53922a83cb1de1100
This commit is contained in:
parent
a6253ea0bd
commit
2e19cd8959
|
@ -80,14 +80,18 @@ func init() {
|
|||
pctx.HostBinToolVariable("SoongZipCmd", "soong_zip")
|
||||
pctx.HostBinToolVariable("MergeZipsCmd", "merge_zips")
|
||||
pctx.VariableFunc("DxCmd", func(config interface{}) (string, error) {
|
||||
dexer := "d8"
|
||||
if config.(android.Config).IsEnvFalse("USE_D8") {
|
||||
dexer = "dx"
|
||||
}
|
||||
if config.(android.Config).UnbundledBuild() || config.(android.Config).IsPdkBuild() {
|
||||
return "prebuilts/build-tools/common/bin/" + dexer, nil
|
||||
if config.(android.Config).UnbundledBuild() || config.(android.Config).IsPdkBuild() {
|
||||
return "prebuilts/build-tools/common/bin/dx", nil
|
||||
} else {
|
||||
path, err := pctx.HostBinToolPath(config, "dx")
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return path.String(), nil
|
||||
}
|
||||
} else {
|
||||
path, err := pctx.HostBinToolPath(config, dexer)
|
||||
path, err := pctx.HostBinToolPath(config, "d8-compat-dx")
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue