diff options
author | 2019-10-09 17:10:08 +0100 | |
---|---|---|
committer | 2019-10-09 18:38:14 +0100 | |
commit | 1f52e93db22db1ab3ac2a250f3bdf6ccabbc0472 (patch) | |
tree | 4aacfcab7c0d91982510bdc494c689d99de9f14f /java/system_modules.go | |
parent | df7dc82a04dfe78ad51af636329471edddf39c8e (diff) |
Add experimental option to use OpenJDK 11 toolchain.
With this change, setting the environment variable
EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN=true switches from the OpenJDK 9
toolchain to the OpenJDK 11 one (prebuilts/jdk/jdk11).
Since the version of the java.base module has to match the version of
the jlink tool which consumes it, the --module-version argument to the
jmod create call is also switched.
Test: make
Test: EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN make
Bug: 131683177
Change-Id: I606d22538165f309fe5537bd67a26390b1dd5771
Diffstat (limited to 'java/system_modules.go')
-rw-r--r-- | java/system_modules.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/java/system_modules.go b/java/system_modules.go index 8ad718124..b56a401d3 100644 --- a/java/system_modules.go +++ b/java/system_modules.go @@ -40,7 +40,9 @@ var ( `${config.JavacCmd} --system=none --patch-module=java.base=${classpath} ${workDir}/module-info.java && ` + `${config.SoongZipCmd} -jar -o ${workDir}/classes.jar -C ${workDir} -f ${workDir}/module-info.class && ` + `${config.MergeZipsCmd} -j ${workDir}/module.jar ${workDir}/classes.jar $in && ` + - `${config.JmodCmd} create --module-version 9 --target-platform android ` + + // Note: The version of the java.base module created must match the version + // of the jlink tool which consumes it. + `${config.JmodCmd} create --module-version ${config.JlinkVersion} --target-platform android ` + ` --class-path ${workDir}/module.jar ${workDir}/jmod/java.base.jmod && ` + `${config.JlinkCmd} --module-path ${workDir}/jmod --add-modules java.base --output ${outDir} ` + // Note: The system-modules jlink plugin is disabled because (a) it is not |