aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorTobias Thierer <tobiast@google.com>2017-11-17 14:14:29 +0000
committerTobias Thierer <tobiast@google.com>2018-01-04 11:07:38 +0000
commit18099fd8560268ad13bbfa0661479d06e72f1960 (patch)
tree302ceac7110979e51506f04d8806175b1e37c110 /ui
parentb4330e222b8df54727d0054075d63f2dcdf0a959 (diff)
downloadbuild_soong-18099fd8560268ad13bbfa0661479d06e72f1960.tar.gz
build_soong-18099fd8560268ad13bbfa0661479d06e72f1960.tar.bz2
build_soong-18099fd8560268ad13bbfa0661479d06e72f1960.zip
Build with OpenJDK 9 -target 1.8 by default (attempt 4).
This is cherry-picked from attempt 3, which was reverted due to http://b/70862583. Before this CL topic, the build toolchain for .java source files used OpenJDK 8, targeting 1.8 (v52 class files) by default. This CL topic switches the default to OpenJDK 9, but still targeting 1.8 (v52 class files) by default. If USE_ERROR_PRONE is set to true, then the default remains OpenJDK 8. Code in the Android platform should generally be unaffected, but if host tools that are now compiled and run using OpenJDK 9 are causing problems for your team, then let me know. To manually switch back to the old behavior for now (continue using OpenJDK 8), run this command in your shell: export EXPERIMENTAL_USE_OPENJDK9=false Bug: 69449021 Test: Treehugger Test: art/test/testrunner/run_build_test_target.py -j40 art-interpreter Test: dalvik/dx/tests/run-all-tests (cherry picked from commit 13f23a2753f7093a2344db91a04973a3b24b6789) Change-Id: I57abae73f9bdb21ef004a5118ff0e4ef70418ed9 Merged-in: Iac78122f58df0ebbb55134d55021ce6c57351b5f
Diffstat (limited to 'ui')
-rw-r--r--ui/build/config.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/ui/build/config.go b/ui/build/config.go
index c9752432..f2511e76 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -152,7 +152,16 @@ func NewConfig(ctx Context, args ...string) Config {
if override, ok := ret.environ.Get("OVERRIDE_ANDROID_JAVA_HOME"); ok {
return override
}
- if v, ok := ret.environ.Get("EXPERIMENTAL_USE_OPENJDK9"); ok && v != "" && v != "false" {
+ v, ok := ret.environ.Get("EXPERIMENTAL_USE_OPENJDK9")
+ if !ok {
+ v2, ok2 := ret.environ.Get("RUN_ERROR_PRONE")
+ if ok2 && (v2 == "true") {
+ v = "false"
+ } else {
+ v = "1.8"
+ }
+ }
+ if v != "false" {
return java9Home
}
return java8Home