Use the toolchain from JDK 17

Bug: 233029164
Test: m
Change-Id: I3375bd4e4186c0049490ee3ddc0f85552d25b579
This commit is contained in:
Sorin Basca 2022-07-22 17:24:02 +01:00
parent fba6f7797c
commit 8eac0005c6
2 changed files with 5 additions and 10 deletions

View file

@ -132,12 +132,7 @@ func init() {
if override := ctx.Config().Getenv("OVERRIDE_JLINK_VERSION_NUMBER"); override != "" {
return override
}
switch ctx.Config().Getenv("EXPERIMENTAL_USE_OPENJDK17_TOOLCHAIN") {
case "true":
return "17"
default:
return "11"
}
return "17"
})
pctx.SourcePathVariable("JavaToolchain", "${JavaHome}/bin")

View file

@ -387,13 +387,13 @@ func NewConfig(ctx Context, args ...string) Config {
if override, ok := ret.environ.Get("OVERRIDE_ANDROID_JAVA_HOME"); ok {
return override
}
if ret.environ.IsEnvTrue("EXPERIMENTAL_USE_OPENJDK17_TOOLCHAIN") {
return java17Home
}
if toolchain11, ok := ret.environ.Get("EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN"); ok && toolchain11 != "true" {
ctx.Fatalln("The environment variable EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN is no longer supported. An OpenJDK 11 toolchain is now the global default.")
}
return java11Home
if toolchain17, ok := ret.environ.Get("EXPERIMENTAL_USE_OPENJDK17_TOOLCHAIN"); ok && toolchain17 != "true" {
ctx.Fatalln("The environment variable EXPERIMENTAL_USE_OPENJDK17_TOOLCHAIN is no longer supported. An OpenJDK 17 toolchain is now the global default.")
}
return java17Home
}()
absJavaHome := absPath(ctx, javaHome)