Skip to content

Commit c57bd53

Browse files
Merge tag 'jdk-24+24' into labsjdk/adopt-jdk-24+24-master
Added tag jdk-24+24 for changeset 95a00f8
2 parents 2061df5 + 95a00f8 commit c57bd53

File tree

2,813 files changed

+35735
-77833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,813 files changed

+35735
-77833
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ jobs:
284284
with:
285285
platform: macos-aarch64
286286
runs-on: 'macos-14'
287-
xcode-toolset-version: '14.3.1'
287+
xcode-toolset-version: '15.4'
288288
configure-arguments: ${{ github.event.inputs.configure-arguments }}
289289
make-arguments: ${{ github.event.inputs.make-arguments }}
290290
if: needs.prepare.outputs.macos-aarch64 == 'true'
@@ -354,6 +354,7 @@ jobs:
354354
platform: macos-x64
355355
bootjdk-platform: macos-x64
356356
runs-on: macos-13
357+
xcode-toolset-version: '14.3.1'
357358

358359
test-macos-aarch64:
359360
name: macos-aarch64
@@ -364,6 +365,7 @@ jobs:
364365
platform: macos-aarch64
365366
bootjdk-platform: macos-aarch64
366367
runs-on: macos-14
368+
xcode-toolset-version: '15.4'
367369

368370
test-windows-x64:
369371
name: windows-x64

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ on:
3737
runs-on:
3838
required: true
3939
type: string
40+
xcode-toolset-version:
41+
required: false
42+
type: string
4043

4144
env:
4245
# These are needed to make the MSYS2 bash work properly
@@ -147,7 +150,7 @@ jobs:
147150
run: |
148151
# On macOS we need to install some dependencies for testing
149152
brew install make
150-
sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
153+
sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-toolset-version }}.app/Contents/Developer
151154
# This will make GNU make available as 'make' and not only as 'gmake'
152155
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
153156
if: runner.os == 'macOS'

make/Images.gmk

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ JLINK_DISABLE_WARNINGS := | ( $(GREP) -v -e "WARNING: Using incubator module" ||
9696
JDK_IMAGE_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk
9797
JRE_IMAGE_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre
9898

99+
ifeq ($(JLINK_PRODUCE_LINKABLE_RUNTIME), true)
100+
JLINK_JDK_EXTRA_OPTS += --generate-linkable-runtime
101+
endif
102+
99103
$(eval $(call SetupExecute, jlink_jdk, \
100104
WARN := Creating jdk image, \
101105
DEPS := $(JDK_JMODS) $(BASE_RELEASE_FILE) \
@@ -132,10 +136,16 @@ CDS_DUMP_FLAGS = -Xmx128M -Xms128M
132136
# Helper function for creating the CDS archives for the JDK and JRE
133137
#
134138
# Param1 - VM variant (e.g., server, client, zero, ...)
135-
# Param2 - _nocoops, or empty
139+
# Param2 - _nocoops, _coh, _nocoops_coh, or empty
136140
define CreateCDSArchive
137-
$1_$2_DUMP_EXTRA_ARG := $(if $(filter _nocoops, $2), -XX:-UseCompressedOops, )
138-
$1_$2_DUMP_TYPE := $(if $(filter _nocoops, $2), -NOCOOPS, )
141+
$1_$2_COOPS_OPTION := $(if $(findstring _nocoops, $2),-XX:-UseCompressedOops)
142+
# enable and also explicitly disable coh as needed.
143+
ifeq ($(call isTargetCpuBits, 64), true)
144+
$1_$2_COH_OPTION := -XX:+UnlockExperimentalVMOptions \
145+
$(if $(findstring _coh, $2),-XX:+UseCompactObjectHeaders,-XX:-UseCompactObjectHeaders)
146+
endif
147+
$1_$2_DUMP_EXTRA_ARG := $$($1_$2_COOPS_OPTION) $$($1_$2_COH_OPTION)
148+
$1_$2_DUMP_TYPE := $(if $(findstring _nocoops, $2),-NOCOOPS,)$(if $(findstring _coh, $2),-COH,)
139149

140150
# Only G1 supports dumping the shared heap, so explicitly use G1 if the JVM supports it.
141151
$1_$2_CDS_DUMP_FLAGS := $(CDS_DUMP_FLAGS) $(if $(filter g1gc, $(JVM_FEATURES_$1)), -XX:+UseG1GC)
@@ -190,6 +200,14 @@ ifeq ($(BUILD_CDS_ARCHIVE), true)
190200
$(foreach v, $(JVM_VARIANTS), \
191201
$(eval $(call CreateCDSArchive,$v,_nocoops)) \
192202
)
203+
ifeq ($(BUILD_CDS_ARCHIVE_COH), true)
204+
$(foreach v, $(JVM_VARIANTS), \
205+
$(eval $(call CreateCDSArchive,$v,_coh)) \
206+
)
207+
$(foreach v, $(JVM_VARIANTS), \
208+
$(eval $(call CreateCDSArchive,$v,_nocoops_coh)) \
209+
)
210+
endif
193211
endif
194212
endif
195213

make/autoconf/basic.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
7676
fi
7777
7878
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
79+
if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
80+
AC_MSG_ERROR([32-bit Windows builds are not supported])
81+
fi
7982
BASIC_SETUP_PATHS_WINDOWS
8083
fi
8184

make/autoconf/configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
261261
JDKOPT_EXCLUDE_TRANSLATIONS
262262
JDKOPT_ENABLE_DISABLE_MANPAGES
263263
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE
264+
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE_COH
264265
JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT
265266
JDKOPT_SETUP_MACOSX_SIGNING
266267

make/autoconf/flags-ldflags.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
7474
# Clang needs the lld linker to work correctly
7575
BASIC_LDFLAGS="-fuse-ld=lld -Wl,--exclude-libs,ALL"
7676
if test "x$CXX_IS_USER_SUPPLIED" = xfalse && test "x$CC_IS_USER_SUPPLIED" = xfalse; then
77-
UTIL_REQUIRE_PROGS(LLD, lld)
77+
UTIL_REQUIRE_PROGS(LLD, lld, $TOOLCHAIN_PATH:$PATH)
7878
fi
7979
fi
8080
if test "x$OPENJDK_TARGET_OS" = xaix; then

make/autoconf/jdk-options.m4

Lines changed: 64 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -586,13 +586,42 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JMOD_OPTIONS],
586586
################################################################################
587587
#
588588
# jlink options.
589-
# We always keep packaged modules in JDK image.
590589
#
591590
AC_DEFUN_ONCE([JDKOPT_SETUP_JLINK_OPTIONS],
592591
[
593-
UTIL_ARG_ENABLE(NAME: keep-packaged-modules, DEFAULT: true,
592+
593+
################################################################################
594+
#
595+
# Configure option for building a JDK that is suitable for linking from the
596+
# run-time image without JMODs.
597+
#
598+
# Determines whether or not a suitable run-time image is being produced from
599+
# packaged modules. If set to 'true, changes the *default* of packaged
600+
# modules to 'false'.
601+
#
602+
UTIL_ARG_ENABLE(NAME: linkable-runtime, DEFAULT: false,
603+
RESULT: JLINK_PRODUCE_LINKABLE_RUNTIME,
604+
DESC: [enable a JDK build suitable for linking from the run-time image],
605+
CHECKING_MSG: [whether or not a JDK suitable for linking from the run-time image should be produced])
606+
AC_SUBST(JLINK_PRODUCE_LINKABLE_RUNTIME)
607+
608+
if test "x$JLINK_PRODUCE_LINKABLE_RUNTIME" = xtrue; then
609+
DEFAULT_PACKAGED_MODULES=false
610+
else
611+
DEFAULT_PACKAGED_MODULES=true
612+
fi
613+
614+
################################################################################
615+
#
616+
# Configure option for packaged modules
617+
#
618+
# We keep packaged modules in the JDK image unless --enable-linkable-runtime is
619+
# requested.
620+
#
621+
UTIL_ARG_ENABLE(NAME: keep-packaged-modules, DEFAULT: $DEFAULT_PACKAGED_MODULES,
594622
RESULT: JLINK_KEEP_PACKAGED_MODULES,
595623
DESC: [enable keeping of packaged modules in jdk image],
624+
DEFAULT_DESC: [enabled by default unless --enable-linkable-runtime is set],
596625
CHECKING_MSG: [if packaged modules are kept])
597626
AC_SUBST(JLINK_KEEP_PACKAGED_MODULES)
598627
])
@@ -638,14 +667,11 @@ AC_DEFUN([JDKOPT_EXCLUDE_TRANSLATIONS],
638667

639668
################################################################################
640669
#
641-
# Optionally disable man pages
670+
# Optionally disable man pages (deprecated)
642671
#
643672
AC_DEFUN([JDKOPT_ENABLE_DISABLE_MANPAGES],
644673
[
645-
UTIL_ARG_ENABLE(NAME: manpages, DEFAULT: true, RESULT: BUILD_MANPAGES,
646-
DESC: [enable copying of static man pages],
647-
CHECKING_MSG: [if static man pages should be copied])
648-
AC_SUBST(BUILD_MANPAGES)
674+
UTIL_DEPRECATED_ARG_ENABLE(manpages)
649675
])
650676

651677
################################################################################
@@ -673,6 +699,37 @@ AC_DEFUN([JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE],
673699
AC_SUBST(BUILD_CDS_ARCHIVE)
674700
])
675701

702+
################################################################################
703+
#
704+
# Enable or disable the default CDS archive generation for Compact Object Headers
705+
#
706+
AC_DEFUN([JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE_COH],
707+
[
708+
UTIL_ARG_ENABLE(NAME: cds-archive-coh, DEFAULT: auto, RESULT: BUILD_CDS_ARCHIVE_COH,
709+
DESC: [enable generation of default CDS archives for compact object headers (requires --enable-cds-archive)],
710+
DEFAULT_DESC: [auto],
711+
CHECKING_MSG: [if default CDS archives for compact object headers should be generated],
712+
CHECK_AVAILABLE: [
713+
AC_MSG_CHECKING([if CDS archive with compact object headers is available])
714+
if test "x$BUILD_CDS_ARCHIVE" = "xfalse"; then
715+
AC_MSG_RESULT([no (CDS default archive generation is disabled)])
716+
AVAILABLE=false
717+
elif test "x$OPENJDK_TARGET_CPU" != "xx86_64" &&
718+
test "x$OPENJDK_TARGET_CPU" != "xaarch64" &&
719+
test "x$OPENJDK_TARGET_CPU" != "xppc64" &&
720+
test "x$OPENJDK_TARGET_CPU" != "xppc64le" &&
721+
test "x$OPENJDK_TARGET_CPU" != "xriscv64" &&
722+
test "x$OPENJDK_TARGET_CPU" != "xs390x"; then
723+
AC_MSG_RESULT([no (compact object headers not supported for this platform)])
724+
AVAILABLE=false
725+
else
726+
AC_MSG_RESULT([yes])
727+
AVAILABLE=true
728+
fi
729+
])
730+
AC_SUBST(BUILD_CDS_ARCHIVE_COH)
731+
])
732+
676733
################################################################################
677734
#
678735
# Enable the alternative CDS core region alignment

make/autoconf/platform.m4

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -666,14 +666,14 @@ AC_DEFUN([PLATFORM_CHECK_DEPRECATION],
666666
[
667667
AC_ARG_ENABLE(deprecated-ports, [AS_HELP_STRING([--enable-deprecated-ports@<:@=yes/no@:>@],
668668
[Suppress the error when configuring for a deprecated port @<:@no@:>@])])
669-
if test "x$OPENJDK_TARGET_OS" = xwindows && test "x$OPENJDK_TARGET_CPU" = xx86; then
670-
if test "x$enable_deprecated_ports" = "xyes"; then
671-
AC_MSG_WARN([The Windows 32-bit x86 port is deprecated and may be removed in a future release.])
672-
else
673-
AC_MSG_ERROR(m4_normalize([The Windows 32-bit x86 port is deprecated and may be removed in a future release.
674-
Use --enable-deprecated-ports=yes to suppress this error.]))
675-
fi
676-
fi
669+
# if test "x$OPENJDK_TARGET_CPU" = xx86; then
670+
# if test "x$enable_deprecated_ports" = "xyes"; then
671+
# AC_MSG_WARN([The x86 port is deprecated and may be removed in a future release.])
672+
# else
673+
# AC_MSG_ERROR(m4_normalize([The 32-bit x86 port is deprecated and may be removed in a future release.
674+
# Use --enable-deprecated-ports=yes to suppress this error.]))
675+
# fi
676+
# fi
677677
])
678678

679679
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],

make/autoconf/spec.gmk.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,8 @@ ENABLE_GENERATE_CLASSLIST := @ENABLE_GENERATE_CLASSLIST@
367367

368368
EXCLUDE_TRANSLATIONS := @EXCLUDE_TRANSLATIONS@
369369

370-
BUILD_MANPAGES := @BUILD_MANPAGES@
371-
372370
BUILD_CDS_ARCHIVE := @BUILD_CDS_ARCHIVE@
371+
BUILD_CDS_ARCHIVE_COH := @BUILD_CDS_ARCHIVE_COH@
373372

374373
ENABLE_COMPATIBLE_CDS_ALIGNMENT := @ENABLE_COMPATIBLE_CDS_ALIGNMENT@
375374

@@ -707,6 +706,7 @@ NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS)
707706

708707
JMOD_COMPRESS := @JMOD_COMPRESS@
709708
JLINK_KEEP_PACKAGED_MODULES := @JLINK_KEEP_PACKAGED_MODULES@
709+
JLINK_PRODUCE_LINKABLE_RUNTIME := @JLINK_PRODUCE_LINKABLE_RUNTIME@
710710

711711
RCFLAGS := @RCFLAGS@
712712

make/autoconf/toolchain_microsoft.m4

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -82,9 +82,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
8282
fi
8383
8484
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
85-
if test "x$TARGET_CPU" = xx86; then
86-
VCVARSFILES="vcvars32.bat vcvarsamd64_x86.bat"
87-
elif test "x$TARGET_CPU" = xx86_64; then
85+
if test "x$TARGET_CPU" = xx86_64; then
8886
VCVARSFILES="vcvars64.bat vcvarsx86_amd64.bat"
8987
elif test "x$TARGET_CPU" = xaarch64; then
9088
# for host x86-64, target aarch64
@@ -132,9 +130,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
132130
elif test -f "$WIN_SDK_BASE/bin/setenv.cmd"; then
133131
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
134132
VS_ENV_CMD="$WIN_SDK_BASE/bin/setenv.cmd"
135-
if test "x$TARGET_CPU" = xx86; then
136-
VS_ENV_ARGS="/x86"
137-
elif test "x$TARGET_CPU" = xx86_64; then
133+
if test "x$TARGET_CPU" = xx86_64; then
138134
VS_ENV_ARGS="/x64"
139135
elif test "x$TARGET_CPU" = xaarch64; then
140136
VS_ENV_ARGS="/arm64"
@@ -438,9 +434,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL],
438434
# Need to check if the found msvcr is correct architecture
439435
AC_MSG_CHECKING([found $DLL_NAME architecture])
440436
MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
441-
if test "x$OPENJDK_TARGET_CPU" = xx86; then
442-
CORRECT_MSVCR_ARCH=386
443-
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
437+
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
444438
CORRECT_MSVCR_ARCH=x86-64
445439
elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
446440
# The cygwin 'file' command only returns "PE32+ executable (DLL) (console), for MS Windows",
@@ -466,9 +460,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
466460
DLL_HELP="$2"
467461
MSVC_DLL=
468462
469-
if test "x$OPENJDK_TARGET_CPU" = xx86; then
470-
vs_target_cpu=x86
471-
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
463+
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
472464
vs_target_cpu=x64
473465
elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
474466
vs_target_cpu=arm64
@@ -522,18 +514,8 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
522514
# Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
523515
# (This was the original behaviour; kept since it might turn something up)
524516
if test "x$VCINSTALLDIR" != x; then
525-
if test "x$OPENJDK_TARGET_CPU" = xx86; then
526-
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
527-
| $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $GREP -v arm64 | $HEAD --lines 1`
528-
if test "x$POSSIBLE_MSVC_DLL" = x; then
529-
# We're grasping at straws now...
530-
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
531-
| $HEAD --lines 1`
532-
fi
533-
else
534-
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
535-
| $GREP x64 | $HEAD --lines 1`
536-
fi
517+
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
518+
| $GREP x64 | $HEAD --lines 1`
537519
538520
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
539521
[search of VCINSTALLDIR])

0 commit comments

Comments
 (0)