Merge changes I0d679648,I31542e7f

am: 31d57588c9

Change-Id: I3cfdaf2cfb6b5eef840f66c2c9fce5d82c2cd10b
This commit is contained in:
Pete Gillin 2019-11-11 09:23:35 -08:00 committed by android-build-merger
commit 6414dde54e
2 changed files with 5 additions and 7 deletions

View File

@ -87,12 +87,10 @@ func init() {
return ctx.Config().Getenv("ANDROID_JAVA_HOME")
})
pctx.VariableFunc("JlinkVersion", func(ctx android.PackageVarContext) string {
switch ctx.Config().Getenv("EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN") {
case "false":
return "9"
default:
return "11"
if override := ctx.Config().Getenv("OVERRIDE_JLINK_VERSION_NUMBER"); override != "" {
return override
}
return "11"
})
pctx.SourcePathVariable("JavaToolchain", "${JavaHome}/bin")

View File

@ -219,8 +219,8 @@ func NewConfig(ctx Context, args ...string) Config {
if override, ok := ret.environ.Get("OVERRIDE_ANDROID_JAVA_HOME"); ok {
return override
}
if toolchain9, ok := ret.environ.Get("EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN"); ok && toolchain9 == "false" {
return java9Home
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
}()