Skip to content

Commit 23985c2

Browse files
committed
8357979: Compile jdk.internal.vm.ci targeting the Boot JDK version
Reviewed-by: erikj, dnsimon
1 parent 0ad919c commit 23985c2

5 files changed

Lines changed: 16 additions & 11 deletions

File tree

make/CompileJavaModules.gmk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ $(eval $(call SetupJavaCompilation, $(MODULE), \
115115
EXCLUDE_FILES := $(EXCLUDE_FILES), \
116116
EXCLUDE_PATTERNS := -files, \
117117
KEEP_ALL_TRANSLATIONS := $(KEEP_ALL_TRANSLATIONS), \
118+
TARGET_RELEASE := $(TARGET_RELEASE), \
118119
JAVAC_FLAGS := \
119120
$(DOCLINT) \
120121
$(JAVAC_FLAGS) \

make/autoconf/boot-jdk.m4

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,11 +395,9 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
395395
396396
# When compiling code to be executed by the Boot JDK, force compatibility with the
397397
# oldest supported bootjdk.
398-
OLDEST_BOOT_JDK=`$ECHO $DEFAULT_ACCEPTABLE_BOOT_VERSIONS \
398+
OLDEST_BOOT_JDK_VERSION=`$ECHO $DEFAULT_ACCEPTABLE_BOOT_VERSIONS \
399399
| $TR " " "\n" | $SORT -n | $HEAD -n1`
400-
# -Xlint:-options is added to avoid "warning: [options] system modules path not set in conjunction with -source"
401-
BOOT_JDK_SOURCETARGET="-source $OLDEST_BOOT_JDK -target $OLDEST_BOOT_JDK -Xlint:-options"
402-
AC_SUBST(BOOT_JDK_SOURCETARGET)
400+
AC_SUBST(OLDEST_BOOT_JDK_VERSION)
403401
404402
# Check if the boot jdk is 32 or 64 bit
405403
if $JAVA -version 2>&1 | $GREP -q "64-Bit"; then

make/autoconf/spec.gmk.template

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,8 @@ EXTERNAL_BUILDJDK := @EXTERNAL_BUILDJDK@
393393
# Whether the boot jdk jar supports --date=TIMESTAMP
394394
BOOT_JDK_JAR_SUPPORTS_DATE := @BOOT_JDK_JAR_SUPPORTS_DATE@
395395

396-
# When compiling Java source to be run by the boot jdk
397-
# use these extra flags, eg -source 6 -target 6
398-
BOOT_JDK_SOURCETARGET := @BOOT_JDK_SOURCETARGET@
396+
# The oldest supported boot jdk version
397+
OLDEST_BOOT_JDK_VERSION := @OLDEST_BOOT_JDK_VERSION@
399398

400399
# Information about the build system
401400
NUM_CORES := @NUM_CORES@

make/common/JavaCompilation.gmk

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,15 @@ include JarArchive.gmk
3838
###
3939

4040
# Create classes that can run on the bootjdk
41-
TARGET_RELEASE_BOOTJDK := $(BOOT_JDK_SOURCETARGET)
42-
43-
# Create classes that can be used in (or be a part of) the new jdk we're building
44-
TARGET_RELEASE_NEWJDK := -source $(JDK_SOURCE_TARGET_VERSION) -target $(JDK_SOURCE_TARGET_VERSION)
41+
# -Xlint:-options is added to avoid the warning
42+
# "system modules path not set in conjunction with -source"
43+
TARGET_RELEASE_BOOTJDK := -source $(OLDEST_BOOT_JDK_VERSION) \
44+
-target $(OLDEST_BOOT_JDK_VERSION) -Xlint:-options
45+
46+
# Create classes that can be used in (or be a part of) the new jdk we're
47+
# building
48+
TARGET_RELEASE_NEWJDK := -source $(JDK_SOURCE_TARGET_VERSION) \
49+
-target $(JDK_SOURCE_TARGET_VERSION)
4550

4651
# Create classes that can be used in JDK 8, for legacy support
4752
TARGET_RELEASE_JDK8 := --release 8

make/modules/jdk.internal.vm.ci/Java.gmk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ DISABLED_WARNINGS_java += dangling-doc-comments this-escape
3333

3434
JAVAC_FLAGS += -parameters -XDstringConcat=inline
3535

36+
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK)
37+
3638
################################################################################

0 commit comments

Comments
 (0)