diff options
author | Yohann Roussel <yroussel@google.com> | 2017-10-23 14:55:05 +0200 |
---|---|---|
committer | Alan Leung <acleung@google.com> | 2017-10-31 13:29:07 -0700 |
commit | 2e19cd89594bdc13b726484f96d955be3fa40e0c (patch) | |
tree | c28ac1fac35ebba8d6b1b7d1c6c26b2ac5b36388 | |
parent | a6253ea0bdd1bbff9c7bbfcac9b032d92c915b5c (diff) | |
download | build_soong-2e19cd89594bdc13b726484f96d955be3fa40e0c.tar.gz build_soong-2e19cd89594bdc13b726484f96d955be3fa40e0c.tar.bz2 build_soong-2e19cd89594bdc13b726484f96d955be3fa40e0c.zip |
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
-rw-r--r-- | java/config/config.go | 16 | ||||
-rw-r--r-- | root.bp | 1 |
2 files changed, 11 insertions, 6 deletions
diff --git a/java/config/config.go b/java/config/config.go index c19a705c..654d9352 100644 --- a/java/config/config.go +++ b/java/config/config.go @@ -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 } @@ -29,6 +29,7 @@ optional_subdirs = [ "packages/apps/*", "prebuilts/clang/host/linux-x86", "prebuilts/ndk", + "prebuilts/r8", "prebuilts/sdk", "prebuilts/misc", "system/*", |