Skip to content

8357979: Compile jdk.internal.vm.ci targeting the Boot JDK version #26069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions make/CompileJavaModules.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ $(eval $(call SetupJavaCompilation, $(MODULE), \
EXCLUDE_FILES := $(EXCLUDE_FILES), \
EXCLUDE_PATTERNS := -files, \
KEEP_ALL_TRANSLATIONS := $(KEEP_ALL_TRANSLATIONS), \
TARGET_RELEASE := $(TARGET_RELEASE), \
JAVAC_FLAGS := \
$(DOCLINT) \
$(JAVAC_FLAGS) \
Expand Down
6 changes: 2 additions & 4 deletions make/autoconf/boot-jdk.m4
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,9 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],

# When compiling code to be executed by the Boot JDK, force compatibility with the
# oldest supported bootjdk.
OLDEST_BOOT_JDK=`$ECHO $DEFAULT_ACCEPTABLE_BOOT_VERSIONS \
OLDEST_BOOT_JDK_VERSION=`$ECHO $DEFAULT_ACCEPTABLE_BOOT_VERSIONS \
| $TR " " "\n" | $SORT -n | $HEAD -n1`
# -Xlint:-options is added to avoid "warning: [options] system modules path not set in conjunction with -source"
BOOT_JDK_SOURCETARGET="-source $OLDEST_BOOT_JDK -target $OLDEST_BOOT_JDK -Xlint:-options"
AC_SUBST(BOOT_JDK_SOURCETARGET)
AC_SUBST(OLDEST_BOOT_JDK_VERSION)

# Check if the boot jdk is 32 or 64 bit
if $JAVA -version 2>&1 | $GREP -q "64-Bit"; then
Expand Down
5 changes: 2 additions & 3 deletions make/autoconf/spec.gmk.template
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,8 @@ EXTERNAL_BUILDJDK := @EXTERNAL_BUILDJDK@
# Whether the boot jdk jar supports --date=TIMESTAMP
BOOT_JDK_JAR_SUPPORTS_DATE := @BOOT_JDK_JAR_SUPPORTS_DATE@

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

# Information about the build system
NUM_CORES := @NUM_CORES@
Expand Down
3 changes: 2 additions & 1 deletion make/common/JavaCompilation.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ include JarArchive.gmk
###

# Create classes that can run on the bootjdk
TARGET_RELEASE_BOOTJDK := $(BOOT_JDK_SOURCETARGET)
# -Xlint:-options is added to avoid "warning: [options] system modules path not set in conjunction with -source"
TARGET_RELEASE_BOOTJDK := -source $(OLDEST_BOOT_JDK_VERSION) -target $(OLDEST_BOOT_JDK_VERSION) -Xlint:-options

# Create classes that can be used in (or be a part of) the new jdk we're building
TARGET_RELEASE_NEWJDK := -source $(JDK_SOURCE_TARGET_VERSION) -target $(JDK_SOURCE_TARGET_VERSION)
Expand Down
2 changes: 2 additions & 0 deletions make/modules/jdk.internal.vm.ci/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ DISABLED_WARNINGS_java += dangling-doc-comments this-escape

JAVAC_FLAGS += -parameters -XDstringConcat=inline

TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK)

################################################################################