Skip to content

Commit

Permalink
Merge upstream-jdk
Browse files Browse the repository at this point in the history
  • Loading branch information
synecdoche committed Nov 15, 2024
2 parents 669425f + ff12ff5 commit 8baeaf5
Show file tree
Hide file tree
Showing 742 changed files with 14,130 additions and 12,394 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ jobs:
with:
platform: macos-aarch64
runs-on: 'macos-14'
xcode-toolset-version: '14.3.1'
xcode-toolset-version: '15.4'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.macos-aarch64 == 'true'
Expand Down Expand Up @@ -355,6 +355,7 @@ jobs:
platform: macos-x64
bootjdk-platform: macos-x64
runs-on: macos-13
xcode-toolset-version: '14.3.1'

test-macos-aarch64:
name: macos-aarch64
Expand All @@ -365,6 +366,7 @@ jobs:
platform: macos-aarch64
bootjdk-platform: macos-aarch64
runs-on: macos-14
xcode-toolset-version: '15.4'

test-windows-x64:
name: windows-x64
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ on:
runs-on:
required: true
type: string
xcode-toolset-version:
required: false
type: string

env:
# These are needed to make the MSYS2 bash work properly
Expand Down Expand Up @@ -147,7 +150,7 @@ jobs:
run: |
# On macOS we need to install some dependencies for testing
brew install make
sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-toolset-version }}.app/Contents/Developer
# This will make GNU make available as 'make' and not only as 'gmake'
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
if: runner.os == 'macOS'
Expand Down
2 changes: 1 addition & 1 deletion make/Global.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ help:
$(info $(_) # method is 'auto', 'ignore' or 'fail' (default))
$(info $(_) TEST="test1 ..." # Use the given test descriptor(s) for testing, e.g.)
$(info $(_) # make test TEST="jdk_lang gtest:all")
$(info $(_) TEST_DEPS="dependency1 ..." # Specify additional dependencies for running tests, e.g docs-jdk
$(info $(_) TEST_DEPS="dependency1 ..." # Specify additional dependencies for running tests, e.g docs-jdk)
$(info $(_) JTREG="OPT1=x;OPT2=y" # Control the JTREG test harness, use 'make test-only JTREG=help' to list)
$(info $(_) GTEST="OPT1=x;OPT2=y" # Control the GTEST test harness, use 'make test-only GTEST=help' to list)
$(info $(_) MICRO="OPT1=x;OPT2=y" # Control the MICRO test harness, use 'make test-only MICRO=help' to list)
Expand Down
3 changes: 3 additions & 0 deletions make/autoconf/basic.m4
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
fi
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
AC_MSG_ERROR([32-bit Windows builds are not supported])
fi
BASIC_SETUP_PATHS_WINDOWS
fi
Expand Down
18 changes: 9 additions & 9 deletions make/autoconf/platform.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -666,14 +666,14 @@ AC_DEFUN([PLATFORM_CHECK_DEPRECATION],
[
AC_ARG_ENABLE(deprecated-ports, [AS_HELP_STRING([--enable-deprecated-ports@<:@=yes/no@:>@],
[Suppress the error when configuring for a deprecated port @<:@no@:>@])])
if test "x$OPENJDK_TARGET_OS" = xwindows && test "x$OPENJDK_TARGET_CPU" = xx86; then
if test "x$enable_deprecated_ports" = "xyes"; then
AC_MSG_WARN([The Windows 32-bit x86 port is deprecated and may be removed in a future release.])
else
AC_MSG_ERROR(m4_normalize([The Windows 32-bit x86 port is deprecated and may be removed in a future release.
Use --enable-deprecated-ports=yes to suppress this error.]))
fi
fi
# if test "x$OPENJDK_TARGET_CPU" = xx86; then
# if test "x$enable_deprecated_ports" = "xyes"; then
# AC_MSG_WARN([The x86 port is deprecated and may be removed in a future release.])
# else
# AC_MSG_ERROR(m4_normalize([The 32-bit x86 port is deprecated and may be removed in a future release.
# Use --enable-deprecated-ports=yes to suppress this error.]))
# fi
# fi
])

AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
Expand Down
32 changes: 7 additions & 25 deletions make/autoconf/toolchain_microsoft.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -82,9 +82,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
fi
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
if test "x$TARGET_CPU" = xx86; then
VCVARSFILES="vcvars32.bat vcvarsamd64_x86.bat"
elif test "x$TARGET_CPU" = xx86_64; then
if test "x$TARGET_CPU" = xx86_64; then
VCVARSFILES="vcvars64.bat vcvarsx86_amd64.bat"
elif test "x$TARGET_CPU" = xaarch64; then
# for host x86-64, target aarch64
Expand Down Expand Up @@ -132,9 +130,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
elif test -f "$WIN_SDK_BASE/bin/setenv.cmd"; then
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
VS_ENV_CMD="$WIN_SDK_BASE/bin/setenv.cmd"
if test "x$TARGET_CPU" = xx86; then
VS_ENV_ARGS="/x86"
elif test "x$TARGET_CPU" = xx86_64; then
if test "x$TARGET_CPU" = xx86_64; then
VS_ENV_ARGS="/x64"
elif test "x$TARGET_CPU" = xaarch64; then
VS_ENV_ARGS="/arm64"
Expand Down Expand Up @@ -438,9 +434,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL],
# Need to check if the found msvcr is correct architecture
AC_MSG_CHECKING([found $DLL_NAME architecture])
MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
if test "x$OPENJDK_TARGET_CPU" = xx86; then
CORRECT_MSVCR_ARCH=386
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
CORRECT_MSVCR_ARCH=x86-64
elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
# The cygwin 'file' command only returns "PE32+ executable (DLL) (console), for MS Windows",
Expand All @@ -466,9 +460,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
DLL_HELP="$2"
MSVC_DLL=
if test "x$OPENJDK_TARGET_CPU" = xx86; then
vs_target_cpu=x86
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
vs_target_cpu=x64
elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
vs_target_cpu=arm64
Expand Down Expand Up @@ -522,18 +514,8 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
# Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
# (This was the original behaviour; kept since it might turn something up)
if test "x$VCINSTALLDIR" != x; then
if test "x$OPENJDK_TARGET_CPU" = xx86; then
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
| $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $GREP -v arm64 | $HEAD --lines 1`
if test "x$POSSIBLE_MSVC_DLL" = x; then
# We're grasping at straws now...
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
| $HEAD --lines 1`
fi
else
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
| $GREP x64 | $HEAD --lines 1`
fi
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
| $GREP x64 | $HEAD --lines 1`
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
[search of VCINSTALLDIR])
Expand Down
4 changes: 1 addition & 3 deletions make/hotspot/gensrc/GensrcAdlc.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ ifeq ($(call check-jvm-feature, compiler2), true)
ADLCFLAGS += -DR18_RESERVED
endif
else ifeq ($(call isTargetOs, windows), true)
ifeq ($(call isTargetCpuBits, 64), true)
ADLCFLAGS += -D_WIN64=1
endif
ADLCFLAGS += -D_WIN64=1
ifeq ($(HOTSPOT_TARGET_CPU_ARCH), aarch64)
ADLCFLAGS += -DR18_RESERVED
endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1896,6 +1896,11 @@ private void finishClassLoading(ClassList classes, Map<String, ModuleDescription
continue;
}

if (ed.packageName.equals("jdk/internal/javac")) {
//keep jdk/internal/javac untouched. It is used to determine participates in preview:
continue;
}

Set<String> usingModules = package2ModulesUsingIt.getOrDefault(ed.packageName(), Set.of());

ed.to.retainAll(usingModules);
Expand Down
6 changes: 1 addition & 5 deletions make/modules/java.desktop/lib/AwtLibraries.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,7 @@ LIBAWT_EXTRA_HEADER_DIRS := \
LIBAWT_CFLAGS := -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES -DMLIB_NO_LIBSUNMATH

ifeq ($(call isTargetOs, windows), true)
LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE
ifeq ($(call isTargetCpuBits, 64), true)
LIBAWT_CFLAGS += -DMLIB_OS64BIT
endif

LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE -DMLIB_OS64BIT
LIBAWT_RCFLAGS ?= -I$(TOPDIR)/src/java.base/windows/native/launcher/icons
LIBAWT_VERSIONINFO_RESOURCE := \
$(TOPDIR)/src/$(MODULE)/windows/native/libawt/windows/awt.rc
Expand Down
85 changes: 33 additions & 52 deletions make/modules/jdk.accessibility/Launcher.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -48,63 +48,44 @@ ifeq ($(call isTargetOs, windows), true)
TARGETS += $(BUILD_JABSWITCH)

##############################################################################
# Setup rules to create 32/64 bit version of jaccessinspector
#
# Parameter 1 File name suffix
# Parameter 2 ACCESSBRIDGE_ARCH_ -D suffix
# Build jaccessinspector
##############################################################################
define SetupInspector
$$(eval $$(call SetupJdkExecutable, BUILD_JACCESSINSPECTOR$1, \
NAME := jaccessinspector$1, \
SRC := jaccessinspector, \
EXTRA_SRC := \
bridge \
common \
toolscommon, \
EXTRA_HEADER_DIRS := include/bridge, \
CFLAGS := -DACCESSBRIDGE_ARCH_$2 -EHsc, \
CXXFLAGS := -DACCESSBRIDGE_ARCH_$2 -EHsc, \
LDFLAGS_windows := -stack:655360, \
LIBS_windows := advapi32.lib user32.lib, \
VERSIONINFO_RESOURCE := \
$(ACCESSIBILITY_SRCDIR)/jaccessinspector/jaccessinspectorWindow.rc, \
))

TARGETS += $$(BUILD_JACCESSINSPECTOR$1)
endef
$(eval $(call SetupJdkExecutable, BUILD_JACCESSINSPECTOR, \
NAME := jaccessinspector, \
EXTRA_SRC := \
bridge \
common \
toolscommon, \
EXTRA_HEADER_DIRS := include/bridge, \
CFLAGS := -DACCESSBRIDGE_ARCH_64 -EHsc, \
CXXFLAGS := -DACCESSBRIDGE_ARCH_64 -EHsc, \
LDFLAGS_windows := -stack:655360, \
LIBS_windows := advapi32.lib user32.lib, \
VERSIONINFO_RESOURCE := \
$(ACCESSIBILITY_SRCDIR)/jaccessinspector/jaccessinspectorWindow.rc, \
))

TARGETS += $(BUILD_JACCESSINSPECTOR)

##############################################################################
# Setup rules to create 32/64 bit version of jaccesswalker
# Parameter 1 File name suffix
# Parameter 2 ACCESSBRIDGE_ARCH_ -D suffix
# Build jaccesswalker
##############################################################################
define SetupWalker
$$(eval $$(call SetupJdkExecutable, BUILD_JACCESSWALKER$1, \
NAME := jaccesswalker$1, \
SRC := jaccesswalker, \
EXTRA_SRC := \
bridge \
common \
toolscommon, \
EXTRA_HEADER_DIRS := include/bridge, \
CFLAGS := -DACCESSBRIDGE_ARCH_$2 -EHsc, \
CXXFLAGS := -DACCESSBRIDGE_ARCH_$2 -EHsc, \
LDFLAGS_windows := -stack:655360, \
LIBS_windows := advapi32.lib comctl32.lib gdi32.lib user32.lib, \
VERSIONINFO_RESOURCE := \
$(ACCESSIBILITY_SRCDIR)/jaccesswalker/jaccesswalkerWindow.rc, \
))

TARGETS += $$(BUILD_JACCESSWALKER$1)
endef
$(eval $(call SetupJdkExecutable, BUILD_JACCESSWALKER, \
NAME := jaccesswalker, \
EXTRA_SRC := \
bridge \
common \
toolscommon, \
EXTRA_HEADER_DIRS := include/bridge, \
CFLAGS := -DACCESSBRIDGE_ARCH_64 -EHsc, \
CXXFLAGS := -DACCESSBRIDGE_ARCH_64 -EHsc, \
LDFLAGS_windows := -stack:655360, \
LIBS_windows := advapi32.lib comctl32.lib gdi32.lib user32.lib, \
VERSIONINFO_RESOURCE := \
$(ACCESSIBILITY_SRCDIR)/jaccesswalker/jaccesswalkerWindow.rc, \
))

ifeq ($(call isTargetCpuBits, 32), true)
$(eval $(call SetupInspector,-32,32))
$(eval $(call SetupWalker,-32,32))
$(eval $(call SetupInspector,,LEGACY))
$(eval $(call SetupWalker,,LEGACY))
else
$(eval $(call SetupInspector,,64))
$(eval $(call SetupWalker,,64))
endif
TARGETS += $(BUILD_JACCESSWALKER)
endif
Loading

0 comments on commit 8baeaf5

Please sign in to comment.