Skip to content

Commit

Permalink
Merge branch 'JDK-8305898' into JDK-8305895-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
rkennke committed Sep 29, 2023
2 parents 1c0d91f + dbb74fb commit 4b92a27
Show file tree
Hide file tree
Showing 3,196 changed files with 96,065 additions and 61,923 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 3 additions & 3 deletions .github/actions/get-bootjdk/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2023, 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 @@ -104,6 +104,6 @@ runs:
- name: 'Export path to where BootJDK is installed'
id: path-name
run: |
# Export the path
echo 'path=bootjdk/jdk' >> $GITHUB_OUTPUT
# Export the absolute path
echo "path=`pwd`/bootjdk/jdk" >> $GITHUB_OUTPUT
shell: bash
2 changes: 1 addition & 1 deletion .github/actions/get-gtest/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ runs:
var: GTEST_VERSION

- name: 'Checkout GTest source'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: google/googletest
ref: 'v${{ steps.version.outputs.value }}'
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/get-jtreg/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ runs:
key: jtreg-${{ steps.version.outputs.value }}

- name: 'Checkout the JTReg source'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: openjdk/jtreg
ref: jtreg-${{ steps.version.outputs.value }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-cross-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:

steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 'Get the BootJDK'
id: bootjdk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:

steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 'Get the BootJDK'
id: bootjdk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:

steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 'Get the BootJDK'
id: bootjdk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:

steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 'Get MSYS2'
uses: ./.github/actions/get-msys2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:

steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 'Get MSYS2'
uses: ./.github/actions/get-msys2
Expand Down
24 changes: 23 additions & 1 deletion make/Bundles.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,27 @@ endif

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

ifneq ($(filter static-libs-graal-bundles, $(MAKECMDGOALS)), )
STATIC_LIBS_GRAAL_BUNDLE_FILES := $(call FindFiles, $(STATIC_LIBS_GRAAL_IMAGE_DIR))

ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
STATIC_LIBS_GRAAL_BUNDLE_SUBDIR := $(JDK_MACOSX_CONTENTS_SUBDIR)/Home
else
STATIC_LIBS_GRAAL_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)
endif

$(eval $(call SetupBundleFile, BUILD_STATIC_LIBS_GRAAL_BUNDLE, \
BUNDLE_NAME := $(STATIC_LIBS_GRAAL_BUNDLE_NAME), \
FILES := $(STATIC_LIBS_GRAAL_BUNDLE_FILES), \
BASE_DIRS := $(STATIC_LIBS_GRAAL_IMAGE_DIR), \
SUBDIR := $(STATIC_LIBS_GRAAL_BUNDLE_SUBDIR), \
))

STATIC_LIBS_GRAAL_TARGETS += $(BUILD_STATIC_LIBS_GRAAL_BUNDLE)
endif

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

# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, Bundles.gmk))

Expand All @@ -490,8 +511,9 @@ docs-jdk-bundles: $(DOCS_JDK_TARGETS)
docs-javase-bundles: $(DOCS_JAVASE_TARGETS)
docs-reference-bundles: $(DOCS_REFERENCE_TARGETS)
static-libs-bundles: $(STATIC_LIBS_TARGETS)
static-libs-graal-bundles: $(STATIC_LIBS_GRAAL_TARGETS)
jcov-bundles: $(JCOV_TARGETS)

.PHONY: all default product-bundles test-bundles \
docs-jdk-bundles docs-javase-bundles docs-reference-bundles \
static-libs-bundles jcov-bundles
static-libs-bundles static-libs-graal-bundles jcov-bundles
4 changes: 0 additions & 4 deletions make/Docs.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ MODULES_SOURCE_PATH := $(call PathList, $(call GetModuleSrcPath) )
# In order to get a specific ordering it's necessary to specify the total
# ordering of tags as the tags are otherwise ordered in order of definition.
JAVADOC_TAGS := \
-tag beaninfo:X \
-tag since.unbundled:X \
-tag Note:X \
-tag ToDo:X \
-tag 'apiNote:a:API Note:' \
-tag 'implSpec:a:Implementation Requirements:' \
-tag 'implNote:a:Implementation Note:' \
Expand Down
6 changes: 4 additions & 2 deletions make/JrtfsJar.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2023, 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 @@ -46,8 +46,10 @@ JIMAGE_PKGS := \
jdk/internal/jrtfs \
#

# Compile jrt-fs.jar with the interim compiler, as it
# ends up in the image, this will ensure reproducible classes
$(eval $(call SetupJavaCompilation, BUILD_JRTFS, \
COMPILER := bootjdk, \
COMPILER := interim, \
DISABLED_WARNINGS := options, \
TARGET_RELEASE := $(TARGET_RELEASE_JDK8), \
SRC := $(TOPDIR)/src/java.base/share/classes, \
Expand Down
12 changes: 9 additions & 3 deletions make/Main.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,12 @@ $(eval $(call SetupTarget, static-libs-bundles, \
DEPS := static-libs-image, \
))

$(eval $(call SetupTarget, static-libs-graal-bundles, \
MAKEFILE := Bundles, \
TARGET := static-libs-graal-bundles, \
DEPS := static-libs-graal-image, \
))

ifeq ($(JCOV_ENABLED), true)
$(eval $(call SetupTarget, jcov-bundles, \
MAKEFILE := Bundles, \
Expand Down Expand Up @@ -1425,13 +1431,13 @@ ALL_TARGETS += $(addsuffix -only, $(filter-out dist-clean clean%, $(ALL_TARGETS)
# are internal only, to support Init.gmk.

print-targets:
@$(ECHO) $(sort $(ALL_TARGETS))
$(info $(subst $(SPACE),$(NEWLINE),$(sort $(ALL_TARGETS))))

print-modules:
@$(ECHO) $(sort $(ALL_MODULES))
$(info $(subst $(SPACE),$(NEWLINE),$(sort $(ALL_MODULES))))

print-tests:
@$(ECHO) $(sort $(ALL_NAMED_TESTS))
$(info $(subst $(SPACE),$(NEWLINE),$(sort $(ALL_NAMED_TESTS))))

create-main-targets-include:
$(call LogInfo, Generating main target list)
Expand Down
12 changes: 7 additions & 5 deletions make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ ifeq ($(TEST_JOBS), 0)
c = c * $(TEST_JOBS_FACTOR_JDL); \
c = c * $(TEST_JOBS_FACTOR_MACHINE); \
if (c < 1) c = 1; \
printf "%.0f", c; \
c = c + 0.5; \
printf "%d", c; \
}')
endif

Expand Down Expand Up @@ -862,8 +863,9 @@ define SetupRunJtregTestBody

$$(eval $$(call SetupRunJtregTestCustom, $1))

clean-workdir-$1:
clean-outputdirs-$1:
$$(RM) -r $$($1_TEST_SUPPORT_DIR)
$$(RM) -r $$($1_TEST_RESULTS_DIR)

$1_COMMAND_LINE := \
$$(JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \
Expand Down Expand Up @@ -909,7 +911,7 @@ define SetupRunJtregTestBody
done
endif

run-test-$1: pre-run-test clean-workdir-$1
run-test-$1: pre-run-test clean-outputdirs-$1
$$(call LogWarn)
$$(call LogWarn, Running test '$$($1_TEST)')
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR) \
Expand Down Expand Up @@ -946,9 +948,9 @@ define SetupRunJtregTestBody
$$(eval $1_TOTAL := 1) \
)

$1: run-test-$1 parse-test-$1 clean-workdir-$1
$1: run-test-$1 parse-test-$1 clean-outputdirs-$1

TARGETS += $1 run-test-$1 parse-test-$1 clean-workdir-$1
TARGETS += $1 run-test-$1 parse-test-$1 clean-outputdirs-$1
TEST_TARGETS += parse-test-$1

endef
Expand Down
7 changes: 5 additions & 2 deletions make/ToolsJdk.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ TOOL_GENERATECACERTS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_class
-Dkeystore.pkcs12.macAlgorithm=NONE \
build.tools.generatecacerts.GenerateCacerts

TOOL_GENERATEEMOJIDATA = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.generateemojidata.GenerateEmojiData
TOOL_GENERATEEXTRAPROPERTIES = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.generateextraproperties.GenerateExtraProperties

TOOL_MAKEZIPREPRODUCIBLE = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.makezipreproducible.MakeZipReproducible
Expand Down Expand Up @@ -137,4 +137,7 @@ PANDOC_HTML_MANPAGE_FILTER := $(BUILDTOOLS_OUTPUTDIR)/manpages/pandoc-html-manpa

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

# Hook to include the corresponding custom post file, if present.
$(eval $(call IncludeCustomExtension, ToolsJdk-post.gmk))

endif # _TOOLS_GMK
2 changes: 1 addition & 1 deletion make/autoconf/basic.m4
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
# df on AIX does not understand -l. On modern AIXes it understands "-T local" which
# is the same. On older AIXes we just continue to live with a "not local build" warning.
if test "x$OPENJDK_TARGET_OS" = xaix; then
if "$DF -T local > /dev/null 2>&1"; then
if $DF -T local > /dev/null 2>&1; then
DF_LOCAL_ONLY_OPTION='-T local'
else # AIX may use GNU-utils instead
DF_LOCAL_ONLY_OPTION='-l'
Expand Down
5 changes: 4 additions & 1 deletion make/autoconf/build-performance.m4
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,11 @@ AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
fi
fi
# The CCACHE_BASEDIR needs to end with '/' as ccache will otherwise think
# directories next to it, that have the base dir name as a prefix, are sub
# directories of CCACHE_BASEDIR.
CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$WORKSPACE_ROOT/ $CCACHE"
if test "x$SET_CCACHE_DIR" != x; then
mkdir -p $CCACHE_DIR > /dev/null 2>&1
Expand Down
7 changes: 5 additions & 2 deletions make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,10 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
TOOLCHAIN_CFLAGS_JVM="-qtbtable=full -qtune=balanced -fno-exceptions \
-qalias=noansi -qstrict -qtls=default -qnortti -qnoeh -qignerrno -qstackprotect"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:inline -MP"
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:inline -Zc:wchar_t-"
# The -utf-8 option sets source and execution character sets to UTF-8 to enable correct
# compilation of all source files regardless of the active code page on Windows.
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:inline -utf-8 -MP"
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:inline -utf-8 -Zc:wchar_t-"
fi
# CFLAGS C language level for JDK sources (hotspot only uses C++)
Expand Down Expand Up @@ -816,6 +818,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
REPRODUCIBLE_CFLAGS=
]
)
AC_SUBST(REPRODUCIBLE_CFLAGS)
fi
# Prevent the __FILE__ macro from generating absolute paths into the built
Expand Down
8 changes: 5 additions & 3 deletions make/autoconf/lib-x11.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, 2023, 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 @@ -35,6 +35,7 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
X_CFLAGS=
X_LIBS=
else
x_libraries_orig="$x_libraries"
if test "x${with_x}" = xno; then
AC_MSG_ERROR([It is not possible to disable the use of X11. Remove the --without-x option.])
Expand All @@ -48,6 +49,7 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
fi
if test "x$x_libraries" = xNONE; then
x_libraries="${with_x}/lib"
x_libraries_orig="$x_libraries"
fi
else
# Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
Expand Down Expand Up @@ -82,8 +84,8 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
AC_PATH_XTRA
# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
# this doesn't make sense so we remove it.
if test "x$COMPILE_TYPE" = xcross; then
# this doesn't make sense so we remove it; same for sysroot (devkit).
if test "x$COMPILE_TYPE" = xcross || (test "x$SYSROOT" != "x" && test "x$x_libraries_orig" = xNONE); then
X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'`
fi
Expand Down
6 changes: 4 additions & 2 deletions make/autoconf/platform.m4
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,6 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
HOTSPOT_$1_CPU_DEFINE=PPC64
elif test "x$OPENJDK_$1_CPU" = xppc64le; then
HOTSPOT_$1_CPU_DEFINE=PPC64
elif test "x$OPENJDK_$1_CPU" = xriscv32; then
HOTSPOT_$1_CPU_DEFINE=RISCV32
elif test "x$OPENJDK_$1_CPU" = xriscv64; then
HOTSPOT_$1_CPU_DEFINE=RISCV64
Expand All @@ -577,10 +575,14 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
HOTSPOT_$1_CPU_DEFINE=SPARC
elif test "x$OPENJDK_$1_CPU" = xppc; then
HOTSPOT_$1_CPU_DEFINE=PPC32
elif test "x$OPENJDK_$1_CPU" = xriscv32; then
HOTSPOT_$1_CPU_DEFINE=RISCV32
elif test "x$OPENJDK_$1_CPU" = xs390; then
HOTSPOT_$1_CPU_DEFINE=S390
elif test "x$OPENJDK_$1_CPU" = xs390x; then
HOTSPOT_$1_CPU_DEFINE=S390
elif test "x$OPENJDK_$1_CPU" = xloongarch64; then
HOTSPOT_$1_CPU_DEFINE=LOONGARCH64
elif test "x$OPENJDK_$1_CPU" != x; then
HOTSPOT_$1_CPU_DEFINE=$(echo $OPENJDK_$1_CPU | tr a-z A-Z)
fi
Expand Down
2 changes: 2 additions & 0 deletions make/autoconf/spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ LIBFFI_CFLAGS:=@LIBFFI_CFLAGS@
ENABLE_LIBFFI_BUNDLING:=@ENABLE_LIBFFI_BUNDLING@
LIBFFI_LIB_FILE:=@LIBFFI_LIB_FILE@
FILE_MACRO_CFLAGS := @FILE_MACRO_CFLAGS@
REPRODUCIBLE_CFLAGS := @REPRODUCIBLE_CFLAGS@
BRANCH_PROTECTION_CFLAGS := @BRANCH_PROTECTION_CFLAGS@

STATIC_LIBS_CFLAGS := @STATIC_LIBS_CFLAGS@
Expand Down Expand Up @@ -984,6 +985,7 @@ DOCS_JDK_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
DOCS_JAVASE_BUNDLE_NAME := javase-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
DOCS_REFERENCE_BUNDLE_NAME := jdk-reference-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
STATIC_LIBS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-static-libs$(DEBUG_PART).tar.gz
STATIC_LIBS_GRAAL_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-static-libs-graal$(DEBUG_PART).tar.gz
JCOV_BUNDLE_NAME := jdk-jcov-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)

JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_BUNDLE_NAME)
Expand Down
11 changes: 7 additions & 4 deletions make/common/NativeCompilation.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,12 @@ endif
# object files while CCACHE_BASEDIR will make ccache relativize all paths for
# its compiler. The compiler then produces relative dependency files.
# make does not know a relative and absolute filename is the same so it will
# ignore such dependencies.
# ignore such dependencies. This only applies when the OUTPUTDIR is inside
# the WORKSPACE_ROOT.
ifneq ($(CCACHE), )
REWRITE_PATHS_RELATIVE = true
ifneq ($(filter $(WORKSPACE_ROOT)/%, $(OUTPUTDIR)), )
REWRITE_PATHS_RELATIVE = true
endif
endif

ifeq ($(REWRITE_PATHS_RELATIVE), true)
Expand Down Expand Up @@ -1162,9 +1165,9 @@ define SetupNativeCompilationBody
$1_LD_OBJ_ARG := `cat $$($1_OBJ_FILE_LIST)`
endif

# If we are building static library, 'AR' on macosx may not support @-file.
# If we are building static library, 'AR' on macosx/aix may not support @-file.
ifeq ($$($1_TYPE), STATIC_LIBRARY)
ifeq ($(call isTargetOs, macosx), true)
ifeq ($(call isTargetOs, macosx aix), true)
$1_LD_OBJ_ARG := `cat $$($1_OBJ_FILE_LIST)`
endif
endif
Expand Down
Loading

0 comments on commit 4b92a27

Please sign in to comment.