Skip to content

Commit

Permalink
Merge jdk
Browse files Browse the repository at this point in the history
Merge jdk-24+21
  • Loading branch information
David Simms committed Nov 26, 2024
2 parents df874c7 + 8bcd492 commit 6e67ac6
Show file tree
Hide file tree
Showing 422 changed files with 92,715 additions and 2,594 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build-cross-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
- target-cpu: riscv64
gnu-arch: riscv64
debian-arch: riscv64
debian-repository: https://snapshot.debian.org/archive/debian/20240228T034848Z/
debian-repository: https://httpredir.debian.org/debian/
debian-version: sid
tolerate-sysroot-errors: true

Expand Down Expand Up @@ -131,6 +131,7 @@ jobs:
id: create-sysroot
run: >
sudo debootstrap
--no-merged-usr
--arch=${{ matrix.debian-arch }}
--verbose
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype-dev,libpng-dev
Expand All @@ -151,6 +152,9 @@ jobs:
rm -rf sysroot/usr/{sbin,bin,share}
rm -rf sysroot/usr/lib/{apt,gcc,udev,systemd}
rm -rf sysroot/usr/libexec/gcc
# /{bin,sbin,lib}/ are not symbolic links to /usr/{bin,sbin,lib}/ when debootstrap with --no-merged-usr
rm -rf sysroot/{sbin,bin}
rm -rf sysroot/lib/{udev,systemd}
if: steps.create-sysroot.outcome == 'success' && steps.get-cached-sysroot.outputs.cache-hit != 'true'

- name: 'Remove broken sysroot'
Expand Down
1 change: 1 addition & 0 deletions make/Global.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +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 $(_) 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
2 changes: 1 addition & 1 deletion make/InitSupport.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ifeq ($(HAS_SPEC), )

# Make control variables, handled by Init.gmk
INIT_CONTROL_VARIABLES += LOG CONF CONF_NAME SPEC JOBS TEST_JOBS CONF_CHECK \
COMPARE_BUILD JTREG GTEST MICRO TEST_OPTS TEST_VM_OPTS
COMPARE_BUILD JTREG GTEST MICRO TEST_OPTS TEST_VM_OPTS TEST_DEPS

# All known make control variables
MAKE_CONTROL_VARIABLES := $(INIT_CONTROL_VARIABLES) TEST JDK_FILTER SPEC_FILTER
Expand Down
8 changes: 4 additions & 4 deletions make/Main.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -785,13 +785,13 @@ $(eval $(call SetupTarget, build-microbenchmark, \
$(eval $(call SetupTarget, test, \
MAKEFILE := RunTests, \
ARGS := TEST="$(TEST)", \
DEPS := jdk-image test-image, \
DEPS := jdk-image test-image $(TEST_DEPS), \
))

$(eval $(call SetupTarget, exploded-test, \
MAKEFILE := RunTests, \
ARGS := TEST="$(TEST)" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR), \
DEPS := exploded-image test-image, \
DEPS := exploded-image test-image $(TEST_DEPS), \
))

ifeq ($(JCOV_ENABLED), true)
Expand Down Expand Up @@ -1110,8 +1110,8 @@ else
test-make-compile-commands: compile-commands

# Declare dependency for all generated test targets
$(foreach t, $(filter-out test-make%, $(ALL_TEST_TARGETS)), $(eval $t: jdk-image test-image))
$(foreach t, $(ALL_EXPLODED_TEST_TARGETS), $(eval $t: exploded-image test-image))
$(foreach t, $(filter-out test-make%, $(ALL_TEST_TARGETS)), $(eval $t: jdk-image test-image $(TEST_DEPS)))
$(foreach t, $(ALL_EXPLODED_TEST_TARGETS), $(eval $t: exploded-image test-image $(TEST_DEPS)))

interim-image: $(INTERIM_JMOD_TARGETS)

Expand Down
8 changes: 8 additions & 0 deletions make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ jaxp_JTREG_PROBLEM_LIST += $(TOPDIR)/test/jaxp/ProblemList.txt
langtools_JTREG_PROBLEM_LIST += $(TOPDIR)/test/langtools/ProblemList.txt
hotspot_JTREG_PROBLEM_LIST += $(TOPDIR)/test/hotspot/jtreg/ProblemList.txt
lib-test_JTREG_PROBLEM_LIST += $(TOPDIR)/test/lib-test/ProblemList.txt
docs_JTREG_PROBLEM_LIST += $(TOPDIR)/test/docs/ProblemList.txt

################################################################################
# Parse test selection
Expand Down Expand Up @@ -739,6 +740,11 @@ define SetupRunJtregTestBody
# Only the problem list for the current test root should be used.
$1_JTREG_PROBLEM_LIST := $$(filter $$($1_TEST_ROOT)%, $$($1_JTREG_PROBLEM_LIST))

# Pass along the path to the tidy html checker
ifneq ($$(TIDY), )
$1_JTREG_BASIC_OPTIONS += -Dtidy=$$(TIDY)
endif

ifneq ($(TEST_JOBS), 0)
$$(eval $$(call SetJtregValue,$1,JTREG_JOBS,$$(TEST_JOBS)))
else
Expand Down Expand Up @@ -868,6 +874,8 @@ define SetupRunJtregTestBody

$1_JTREG_BASIC_OPTIONS += -e:TEST_IMAGE_DIR=$(TEST_IMAGE_DIR)

$1_JTREG_BASIC_OPTIONS += -e:DOCS_JDK_IMAGE_DIR=$$(DOCS_JDK_IMAGE_DIR)

ifneq ($$(JTREG_FAILURE_HANDLER_OPTIONS), )
$1_JTREG_LAUNCHER_OPTIONS += -Djava.library.path="$(JTREG_FAILURE_HANDLER_DIR)"
endif
Expand Down
3 changes: 2 additions & 1 deletion make/autoconf/configure.ac
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 @@ -202,6 +202,7 @@ FLAGS_POST_TOOLCHAIN
LIB_TESTS_SETUP_JTREG
LIB_TESTS_SETUP_JMH
LIB_TESTS_SETUP_JIB
LIB_TESTS_SETUP_TIDY

# Now we can test some aspects on the target using configure macros.
PLATFORM_SETUP_OPENJDK_TARGET_BITS
Expand Down
8 changes: 3 additions & 5 deletions make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -936,15 +936,13 @@ AC_DEFUN_ONCE([FLAGS_SETUP_BRANCH_PROTECTION],
if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${BRANCH_PROTECTION_FLAG}],
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$BRANCH_PROTECTION_FLAG],
IF_TRUE: [BRANCH_PROTECTION_AVAILABLE=true])
fi
fi
BRANCH_PROTECTION_CFLAGS=""
UTIL_ARG_ENABLE(NAME: branch-protection, DEFAULT: false,
RESULT: USE_BRANCH_PROTECTION, AVAILABLE: $BRANCH_PROTECTION_AVAILABLE,
RESULT: BRANCH_PROTECTION_ENABLED, AVAILABLE: $BRANCH_PROTECTION_AVAILABLE,
DESC: [enable branch protection when compiling C/C++],
IF_ENABLED: [ BRANCH_PROTECTION_CFLAGS=${BRANCH_PROTECTION_FLAG}])
AC_SUBST(BRANCH_PROTECTION_CFLAGS)
IF_ENABLED: [BRANCH_PROTECTION_CFLAGS=$BRANCH_PROTECTION_FLAG])
])
4 changes: 4 additions & 0 deletions make/autoconf/flags-other.m4
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,9 @@ AC_DEFUN([FLAGS_SETUP_ASFLAGS_CPU_DEP],
$2JVM_ASFLAGS="${$2JVM_ASFLAGS} $ARM_ARCH_TYPE_ASFLAGS $ARM_FLOAT_TYPE_ASFLAGS"
fi
if test "x$BRANCH_PROTECTION_ENABLED" = "xtrue"; then
$2JVM_ASFLAGS="${$2JVM_ASFLAGS} $BRANCH_PROTECTION_FLAG"
fi
AC_SUBST($2JVM_ASFLAGS)
])
26 changes: 26 additions & 0 deletions make/autoconf/lib-tests.m4
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,32 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_JIB],
AC_SUBST(JIB_HOME)
])

# Setup the tidy html checker
AC_DEFUN_ONCE([LIB_TESTS_SETUP_TIDY],
[
UTIL_LOOKUP_PROGS(TIDY, tidy)
if test "x$TIDY" != x; then
AC_MSG_CHECKING([if tidy is working properly])
tidy_output=`$TIDY --version 2>&1`
if ! $ECHO "$tidy_output" | $GREP -q "HTML Tidy" 2>&1 > /dev/null; then
AC_MSG_RESULT([no])
AC_MSG_NOTICE([$TIDY is not a valid tidy executable and will be ignored. Output from --version: $tidy_output])
TIDY=
elif ! $ECHO "$tidy_output" | $GREP -q "version" 2>&1 > /dev/null; then
AC_MSG_RESULT([no])
AC_MSG_NOTICE([$TIDY is missing a proper version number and will be ignored. Output from --version: $tidy_output])
TIDY=
else
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([for tidy version])
tidy_version=`$ECHO $tidy_output | $SED -e 's/.*version //g'`
AC_MSG_RESULT([$tidy_version])
fi
fi
AC_SUBST(TIDY)
])

################################################################################
#
# Check if building of the jtreg failure handler should be enabled.
Expand Down
2 changes: 1 addition & 1 deletion make/autoconf/spec.gmk.template
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ 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 @@ -744,6 +743,7 @@ MKDIR := @MKDIR@
MV := @MV@
NICE := @NICE@
PANDOC := @PANDOC@
TIDY := @TIDY@
PATCH := @PATCH@
PRINTF := @PRINTF@
READLINK := @READLINK@
Expand Down
4 changes: 2 additions & 2 deletions make/common/FindTests.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2017, 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 @@ -43,7 +43,7 @@ $(eval $(call IncludeCustomExtension, common/FindTests.gmk))
TEST_BASEDIRS += $(TOPDIR)/test $(TOPDIR)

# JTREG_TESTROOTS might have been set by a custom extension
JTREG_TESTROOTS += $(addprefix $(TOPDIR)/test/, hotspot/jtreg jdk langtools jaxp lib-test)
JTREG_TESTROOTS += $(addprefix $(TOPDIR)/test/, hotspot/jtreg jdk langtools jaxp lib-test docs)

# Extract the names of the Jtreg group files from the TEST.ROOT files. The
# TEST.ROOT files being properties files can be interpreted as makefiles so
Expand Down
55 changes: 39 additions & 16 deletions make/conf/jib-profiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ var getJibProfilesProfiles = function (input, common, data) {
"linux-x64": {
target_os: "linux",
target_cpu: "x64",
dependencies: ["devkit", "gtest", "build_devkit", "graphviz", "pandoc"],
dependencies: ["devkit", "gtest", "build_devkit", "graphviz", "pandoc", "tidy"],
configure_args: concat(
(input.build_cpu == "x64" ? common.configure_args_64bit
: "--openjdk-target=x86_64-linux-gnu"),
Expand All @@ -441,7 +441,7 @@ var getJibProfilesProfiles = function (input, common, data) {
"macosx-x64": {
target_os: "macosx",
target_cpu: "x64",
dependencies: ["devkit", "gtest", "graphviz", "pandoc"],
dependencies: ["devkit", "gtest", "graphviz", "pandoc", "tidy"],
configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
"--with-macosx-version-max=11.00.00",
"--enable-compatible-cds-alignment",
Expand All @@ -453,7 +453,7 @@ var getJibProfilesProfiles = function (input, common, data) {
"macosx-aarch64": {
target_os: "macosx",
target_cpu: "aarch64",
dependencies: ["devkit", "gtest", "graphviz", "pandoc"],
dependencies: ["devkit", "gtest", "graphviz", "pandoc", "tidy"],
configure_args: concat(common.configure_args_64bit,
"--with-macosx-version-max=11.00.00"),
},
Expand Down Expand Up @@ -486,7 +486,7 @@ var getJibProfilesProfiles = function (input, common, data) {
"linux-aarch64": {
target_os: "linux",
target_cpu: "aarch64",
dependencies: ["devkit", "gtest", "build_devkit", "graphviz", "pandoc"],
dependencies: ["devkit", "gtest", "build_devkit", "graphviz", "pandoc", "tidy"],
configure_args: [
"--with-zlib=system",
"--disable-dtrace",
Expand Down Expand Up @@ -957,7 +957,7 @@ var getJibProfilesProfiles = function (input, common, data) {

// Profiles used to run tests using Jib for internal dependencies.
var testedProfile = input.testedProfile;
if (testedProfile == null) {
if (testedProfile == null || testedProfile == "docs") {
testedProfile = input.build_os + "-" + input.build_cpu;
}
var testedProfileJdk = testedProfile + ".jdk";
Expand Down Expand Up @@ -999,25 +999,38 @@ var getJibProfilesProfiles = function (input, common, data) {
testOnlyProfilesPrebuilt["run-test-prebuilt"]["dependencies"].push(testedProfile + ".jdk_symbols");
}

var testOnlyProfilesPrebuiltDocs = {
"run-test-prebuilt-docs": clone(testOnlyProfilesPrebuilt["run-test-prebuilt"])
};

testOnlyProfilesPrebuiltDocs["run-test-prebuilt-docs"].dependencies.push("docs.doc_api_spec", "tidy");
testOnlyProfilesPrebuiltDocs["run-test-prebuilt-docs"].environment["DOCS_JDK_IMAGE_DIR"]
= input.get("docs.doc_api_spec", "install_path");
testOnlyProfilesPrebuiltDocs["run-test-prebuilt-docs"].environment["TIDY"]
= input.get("tidy", "home_path") + "/bin/tidy";
testOnlyProfilesPrebuiltDocs["run-test-prebuilt-docs"].labels = "test-docs";

// If actually running the run-test-prebuilt profile, verify that the input
// variable is valid and if so, add the appropriate target_* values from
// the tested profile. Use testImageProfile value as backup.
if (input.profile == "run-test-prebuilt") {
if (input.profile == "run-test-prebuilt" || input.profile == "run-test-prebuilt-docs") {
if (profiles[testedProfile] == null && profiles[testImageProfile] == null) {
error("testedProfile is not defined: " + testedProfile + " " + testImageProfile);
}
}
if (profiles[testedProfile] != null) {
testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_os"]
= profiles[testedProfile]["target_os"];
testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_cpu"]
= profiles[testedProfile]["target_cpu"];
} else if (profiles[testImageProfile] != null) {
testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_os"]
= profiles[testImageProfile]["target_os"];
testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_cpu"]
= profiles[testImageProfile]["target_cpu"];
function updateProfileTargets(profiles, testedProfile, testImageProfile, targetProfile, runTestProfile) {
var profileToCheck = profiles[testedProfile] || profiles[testImageProfile];

if (profileToCheck != null) {
targetProfile[runTestProfile]["target_os"] = profileToCheck["target_os"];
targetProfile[runTestProfile]["target_cpu"] = profileToCheck["target_cpu"];
}
}

updateProfileTargets(profiles, testedProfile, testImageProfile, testOnlyProfilesPrebuilt, "run-test-prebuilt");
updateProfileTargets(profiles, testedProfile, testImageProfile, testOnlyProfilesPrebuiltDocs, "run-test-prebuilt-docs");

profiles = concatObjects(profiles, testOnlyProfilesPrebuiltDocs);
profiles = concatObjects(profiles, testOnlyProfilesPrebuilt);

// On macosx add the devkit bin dir to the path in all the run-test profiles.
Expand Down Expand Up @@ -1067,6 +1080,8 @@ var getJibProfilesProfiles = function (input, common, data) {
}
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"],
runTestPrebuiltSrcFullExtra);
profiles["run-test-prebuilt-docs"] = concatObjects(profiles["run-test-prebuilt-docs"],
runTestPrebuiltSrcFullExtra);
}

// Generate the missing platform attributes
Expand Down Expand Up @@ -1275,6 +1290,14 @@ var getJibProfilesDependencies = function (input, common) {
ext: "tar.gz",
revision: "3.4.2+1.0"
},
tidy: {
organization: common.organization,
ext: "tar.gz",
revision: "5.9.20+1",
environment_path: input.get("tidy", "home_path") + "/bin/tidy",
configure_args: "TIDY=" + input.get("tidy", "home_path") + "/bin/tidy",
module: "tidy-html-" + (input.target_os === "macosx" ? input.target_os : input.target_platform),
},
};

return dependencies;
Expand Down
2 changes: 1 addition & 1 deletion make/conf/module-loader-map.conf
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ UPGRADEABLE_PLATFORM_MODULES= \
java.compiler \
jdk.graal.compiler \
jdk.graal.compiler.management \
jdk.jsobject \
#

PLATFORM_MODULES= \
Expand All @@ -79,7 +80,6 @@ PLATFORM_MODULES= \
jdk.crypto.cryptoki \
jdk.dynalink \
jdk.httpserver \
jdk.jsobject \
jdk.localedata \
jdk.naming.dns \
jdk.security.auth \
Expand Down
Loading

0 comments on commit 6e67ac6

Please sign in to comment.