Skip to content
Permalink
Browse files
Merge jdk
  • Loading branch information
David Simms committed Apr 23, 2020
2 parents e2f1a5f + cc05419 commit d4828d74696ce3a84aa1a545d34427ecb5931910
Showing 889 changed files with 7,132 additions and 93,326 deletions.
@@ -634,3 +634,4 @@ bc54620a3848c26cff9766e5e2a6e5ddab98ed18 jdk-14-ga
82b7c62cf4cc56828a8fb724f57087967232a2a7 jdk-15+15
5c7ec21f5d13f6eb5cd32288c69b8be2f9cac256 jdk-15+16
dd5198db2e5b1ebcafe065d987c03ba9fcb50fc3 jdk-15+17
44aef192b488a48cce12422394691a6b1d16b98e jdk-15+18
@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2020, 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
@@ -88,7 +88,6 @@ src/jdk.naming.dns : jdk/src/jdk.naming.dns
src/jdk.naming.rmi : jdk/src/jdk.naming.rmi
src/jdk.net : jdk/src/jdk.net
src/jdk.pack : jdk/src/jdk.pack
src/jdk.rmic : corba/src/jdk.rmic jdk/src/jdk.rmic
src/jdk.scripting.nashorn : nashorn/src/jdk.scripting.nashorn
src/jdk.scripting.nashorn.shell : nashorn/src/jdk.scripting.nashorn.shell
src/jdk.sctp : jdk/src/jdk.sctp
@@ -140,7 +139,6 @@ src/utils/src/build : jdk/make/non-build-utils/src/build
make/BuildNashorn.gmk : nashorn/make/BuildNashorn.gmk
make/CompileDemos.gmk : jdk/make/CompileDemos.gmk
make/CompileInterimLangtools.gmk : langtools/make/CompileInterim.gmk
make/CompileInterimRmic.gmk : jdk/make/CompileInterimRmic.gmk
make/CompileModuleTools.gmk : jdk/make/CompileModuleTools.gmk
make/CompileToolsHotspot.gmk : hotspot/make/CompileTools.gmk
make/CompileToolsJdk.gmk : jdk/make/CompileTools.gmk
@@ -180,7 +178,6 @@ make/mapfiles/libjvm_dtrace : hotspot/make/mapfiles/libjvm_dtrace
make/mapfiles/libsaproc : hotspot/make/mapfiles/libsaproc
make/nashorn : nashorn/make
make/nb_native : common/nb_native
make/rmic : jdk/make/rmic
make/scripts/addNotices.sh : jdk/make/scripts/addNotices.sh
make/scripts/compare.sh : common/bin/compare.sh
make/scripts/compare_exceptions.sh.incl : common/bin/compare_exceptions.sh.incl
@@ -536,7 +536,7 @@ <h3 id="common-make-targets">Common Make Targets</h3>
<li><code>dist-clean</code> - Remove all files, including configuration</li>
</ul>
<p>Run <code>make help</code> to get an up-to-date list of important make targets and make control variables.</p>
<p>It is possible to build just a single module, a single phase, or a single phase of a single module, by creating make targets according to these followin patterns. A phase can be either of <code>gensrc</code>, <code>gendata</code>, <code>copy</code>, <code>java</code>, <code>launchers</code>, <code>libs</code> or <code>rmic</code>. See <a href="#using-fine-grained-make-targets">Using Fine-Grained Make Targets</a> for more details about this functionality.</p>
<p>It is possible to build just a single module, a single phase, or a single phase of a single module, by creating make targets according to these followin patterns. A phase can be either of <code>gensrc</code>, <code>gendata</code>, <code>copy</code>, <code>java</code>, <code>launchers</code>, or <code>libs</code>. See <a href="#using-fine-grained-make-targets">Using Fine-Grained Make Targets</a> for more details about this functionality.</p>
<ul>
<li><code>&lt;phase&gt;</code> - Build the specified phase and everything it depends on</li>
<li><code>&lt;module&gt;</code> - Build the specified module and everything it depends on</li>
@@ -929,7 +929,6 @@ <h4 id="building-individual-module-phases">Building Individual Module Phases</h4
<li><code>java</code> (Compile Java code)</li>
<li><code>launchers</code> (Compile native executables)</li>
<li><code>libs</code> (Compile native libraries)</li>
<li><code>rmic</code> (Run the <code>rmic</code> tool)</li>
</ul>
<p>You can build only a single phase for a module by using the notation <code>$MODULE-$PHASE</code>. For instance, to build the <code>gensrc</code> phase for <code>java.base</code>, use <code>make java.base-gensrc</code>.</p>
<p>Note that some phases may depend on others, e.g. <code>java</code> depends on <code>gensrc</code> (if present). Make will build all needed prerequisites before building the requested phase.</p>
@@ -818,7 +818,7 @@ control variables.
It is possible to build just a single module, a single phase, or a single phase
of a single module, by creating make targets according to these followin
patterns. A phase can be either of `gensrc`, `gendata`, `copy`, `java`,
`launchers`, `libs` or `rmic`. See [Using Fine-Grained Make Targets](
`launchers`, or `libs`. See [Using Fine-Grained Make Targets](
#using-fine-grained-make-targets) for more details about this functionality.

* `<phase>` - Build the specified phase and everything it depends on
@@ -1619,7 +1619,6 @@ and other artifact the module consists of. The phases are:
* `java` (Compile Java code)
* `launchers` (Compile native executables)
* `libs` (Compile native libraries)
* `rmic` (Run the `rmic` tool)

You can build only a single phase for a module by using the notation
`$MODULE-$PHASE`. For instance, to build the `gensrc` phase for `java.base`,
@@ -177,6 +177,11 @@ else # not java.base
JMOD_FLAGS += --exclude '$(notdir $(MSVCR_DLL))'
endif
endif
ifneq ($(VCRUNTIME_1_DLL), )
ifneq ($(wildcard $(LIBS_DIR)/$(notdir $(VCRUNTIME_1_DLL))), )
JMOD_FLAGS += --exclude '$(notdir $(VCRUNTIME_1_DLL))'
endif
endif
ifneq ($(MSVCP_DLL), )
ifneq ($(wildcard $(LIBS_DIR)/$(notdir $(MSVCP_DLL))), )
JMOD_FLAGS += --exclude '$(notdir $(MSVCP_DLL))'
@@ -37,10 +37,22 @@ ifeq ($(call isTargetOs, windows), true)
$(call install-file)
endif

prepare-test-image: $(FIXPATH_COPY)
BUILD_INFO_PROPERTIES := $(TEST_IMAGE_DIR)/build-info.properties

FIXPATH_ECHO := $(FIXPATH) $(call FixPath, $(ECHO))

$(BUILD_INFO_PROPERTIES):
$(call MakeTargetDir)
$(ECHO) "# Build info properties for JDK tests" > $@
$(FIXPATH_ECHO) "build.workspace.root=$(WORKSPACE_ROOT)" >> $@
$(FIXPATH_ECHO) "build.output.root=$(OUTPUTDIR)" >> $@

prepare-test-image: $(FIXPATH_COPY) $(BUILD_INFO_PROPERTIES)
$(call MakeDir, $(TEST_IMAGE_DIR))
$(ECHO) > $(TEST_IMAGE_DIR)/Readme.txt 'JDK test image'

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

all: prepare-test-image

.PHONY: default all prepare-test-image
@@ -86,6 +86,13 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
AC_SUBST(TOPDIR)
AC_SUBST(CONFIGURE_START_DIR)
if test "x$CUSTOM_ROOT" != x; then
WORKSPACE_ROOT="${CUSTOM_ROOT}"
else
WORKSPACE_ROOT="${TOPDIR}"
fi
AC_SUBST(WORKSPACE_ROOT)
# We can only call UTIL_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
UTIL_FIXUP_PATH(CONFIGURE_START_DIR)
UTIL_FIXUP_PATH(TOPDIR)
@@ -141,6 +148,8 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB])
# Corresponds to --with-msvcr-dll
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL])
# Corresponds to --with-vcruntime-1-dll
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VCRUNTIME_1_DLL])
# Corresponds to --with-msvcp-dll
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL])
# Corresponds to --with-ucrt-dll-dir
@@ -313,11 +322,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
AC_MSG_RESULT([in build directory with custom name])
fi
if test "x$CUSTOM_ROOT" != x; then
WORKSPACE_ROOT="${CUSTOM_ROOT}"
else
WORKSPACE_ROOT="${TOPDIR}"
fi
OUTPUTDIR="${WORKSPACE_ROOT}/build/${CONF_NAME}"
$MKDIR -p "$OUTPUTDIR"
if test ! -d "$OUTPUTDIR"; then
@@ -374,7 +378,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
AC_SUBST(SPEC)
AC_SUBST(CONF_NAME)
AC_SUBST(OUTPUTDIR)
AC_SUBST(WORKSPACE_ROOT)
AC_SUBST(CONFIGURESUPPORT_OUTPUTDIR)
# The spec.gmk file contains all variables for the make system.
@@ -97,6 +97,9 @@ HOTSPOT_SETUP_JVM_VARIANTS
# With basic setup done, call the custom early hook.
CUSTOM_EARLY_HOOK

# This only needs debug level to be setup
JDKOPT_ALLOW_ABSOLUTE_PATHS_IN_OUTPUT

# Check if we have devkits, extra paths or sysroot set.
BASIC_SETUP_DEVKIT

@@ -641,6 +641,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
# Where does this really belong??
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
PICFLAG="-fPIC"
PIEFLAG="-fPIE"
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
PICFLAG="-KPIC"
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
@@ -854,18 +855,27 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
$1_WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized"
fi
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
# Check if compiler supports -fmacro-prefix-map. If so, use that to make
# the __FILE__ macro resolve to paths relative to the workspace root.
workspace_root_trailing_slash="${WORKSPACE_ROOT%/}/"
FILE_MACRO_CFLAGS="-fmacro-prefix-map=${workspace_root_trailing_slash}="
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${FILE_MACRO_CFLAGS}],
PREFIX: $3,
IF_FALSE: [
FILE_MACRO_CFLAGS=
]
)
# Prevent the __FILE__ macro from generating absolute paths into the built
# binaries. Depending on toolchain, different mitigations are possible.
# * GCC and Clang of new enough versions have -fmacro-prefix-map.
# * For most other toolchains, supplying all source files and -I flags as
# relative paths fixes the issue.
FILE_MACRO_CFLAGS=
if test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = "xfalse"; then
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
# Check if compiler supports -fmacro-prefix-map. If so, use that to make
# the __FILE__ macro resolve to paths relative to the workspace root.
workspace_root_trailing_slash="${WORKSPACE_ROOT%/}/"
FILE_MACRO_CFLAGS="-fmacro-prefix-map=${workspace_root_trailing_slash}="
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${FILE_MACRO_CFLAGS}],
PREFIX: $3,
IF_FALSE: [
FILE_MACRO_CFLAGS=
]
)
fi
fi
AC_SUBST(FILE_MACRO_CFLAGS)
# EXPORT to API
CFLAGS_JVM_COMMON="$ALWAYS_CFLAGS_JVM $ALWAYS_DEFINES_JVM \
@@ -894,10 +904,12 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
$2JVM_CFLAGS="$CFLAGS_JVM_COMMON ${$1_CFLAGS_JVM} ${$2EXTRA_CXXFLAGS}"
$2CFLAGS_JDKEXE="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CONLY ${$1_CFLAGS_JDK}"
$2CXXFLAGS_JDKEXE="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CXXONLY ${$1_CFLAGS_JDK}"
$2CFLAGS_JDKLIB="${$2CFLAGS_JDKEXE} $JDK_PICFLAG ${$1_CFLAGS_CPU_JDK_LIBONLY}"
$2CXXFLAGS_JDKLIB="${$2CXXFLAGS_JDKEXE} $JDK_PICFLAG ${$1_CFLAGS_CPU_JDK_LIBONLY}"
$2CFLAGS_JDKEXE="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CONLY ${$1_CFLAGS_JDK} $PIEFLAG"
$2CXXFLAGS_JDKEXE="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CXXONLY ${$1_CFLAGS_JDK} $PIEFLAG"
$2CFLAGS_JDKLIB="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CONLY ${$1_CFLAGS_JDK} \
$JDK_PICFLAG ${$1_CFLAGS_CPU_JDK_LIBONLY}"
$2CXXFLAGS_JDKLIB="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CXXONLY ${$1_CFLAGS_JDK} \
$JDK_PICFLAG ${$1_CFLAGS_CPU_JDK_LIBONLY}"
AC_SUBST($2JVM_CFLAGS)
AC_SUBST($2CFLAGS_JDKLIB)
@@ -152,6 +152,17 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
# Setup LDFLAGS for linking executables
if test "x$TOOLCHAIN_TYPE" = xgcc; then
EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -Wl,--allow-shlib-undefined"
# Enabling pie on 32 bit builds prevents the JVM from allocating a continuous
# java heap.
if test "x$OPENJDK_TARGET_CPU_BITS" != "x32"; then
EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -pie"
fi
fi
if test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = "xfalse"; then
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
BASIC_LDFLAGS="$BASIC_LDFLAGS -pdbaltpath:%_PDB%"
fi
fi
# Export some intermediate variables for compatibility
@@ -598,3 +598,35 @@ AC_DEFUN([JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE],
])
AC_SUBST(BUILD_CDS_ARCHIVE)
])

################################################################################
#
# Disallow any output from containing absolute paths from the build system.
# This setting defaults to allowed on debug builds and not allowed on release
# builds.
#
AC_DEFUN([JDKOPT_ALLOW_ABSOLUTE_PATHS_IN_OUTPUT],
[
AC_ARG_ENABLE([absolute-paths-in-output],
[AS_HELP_STRING([--disable-absolute-paths-in-output],
[Set to disable to prevent any absolute paths from the build to end up in
any of the build output. @<:@disabled in release builds, otherwise enabled@:>@])
])
AC_MSG_CHECKING([if absolute paths should be allowed in the build output])
if test "x$enable_absolute_paths_in_output" = "xno"; then
AC_MSG_RESULT([no, forced])
ALLOW_ABSOLUTE_PATHS_IN_OUTPUT="false"
elif test "x$enable_absolute_paths_in_output" = "xyes"; then
AC_MSG_RESULT([yes, forced])
ALLOW_ABSOLUTE_PATHS_IN_OUTPUT="true"
elif test "x$DEBUG_LEVEL" = "xrelease"; then
AC_MSG_RESULT([no, release build])
ALLOW_ABSOLUTE_PATHS_IN_OUTPUT="false"
else
AC_MSG_RESULT([yes, debug build])
ALLOW_ABSOLUTE_PATHS_IN_OUTPUT="true"
fi
AC_SUBST(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT)
])
@@ -338,6 +338,8 @@ BUILD_MANPAGES := @BUILD_MANPAGES@

BUILD_CDS_ARCHIVE := @BUILD_CDS_ARCHIVE@

ALLOW_ABSOLUTE_PATHS_IN_OUTPUT := @ALLOW_ABSOLUTE_PATHS_IN_OUTPUT@

# The boot jdk to use. This is overridden in bootcycle-spec.gmk. Make sure to keep
# it in sync.
BOOT_JDK:=@BOOT_JDK@
@@ -381,6 +383,7 @@ LIBFFI_CFLAGS:=@LIBFFI_CFLAGS@
ENABLE_LIBFFI_BUNDLING:=@ENABLE_LIBFFI_BUNDLING@
LIBFFI_LIB_FILE:=@LIBFFI_LIB_FILE@
GRAALUNIT_LIB := @GRAALUNIT_LIB@
FILE_MACRO_CFLAGS := @FILE_MACRO_CFLAGS@

STATIC_LIBS_CFLAGS := @STATIC_LIBS_CFLAGS@

@@ -783,6 +786,7 @@ LIBZ_CFLAGS:=@LIBZ_CFLAGS@
LIBZ_LIBS:=@LIBZ_LIBS@
LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
MSVCR_DLL:=@MSVCR_DLL@
VCRUNTIME_1_DLL:=@VCRUNTIME_1_DLL@
MSVCP_DLL:=@MSVCP_DLL@
UCRT_DLL_DIR:=@UCRT_DLL_DIR@
STLPORT_LIB:=@STLPORT_LIB@
@@ -90,8 +90,9 @@ VS_SUPPORTED_2017=true
VS_TOOLSET_SUPPORTED_2017=true

VS_DESCRIPTION_2019="Microsoft Visual Studio 2019"
VS_VERSION_INTERNAL_2019=141
VS_VERSION_INTERNAL_2019=142
VS_MSVCR_2019=vcruntime140.dll
VS_VCRUNTIME_1_2019=vcruntime140_1.dll
VS_MSVCP_2019=msvcp140.dll
VS_ENVVAR_2019="VS160COMNTOOLS"
VS_USE_UCRT_2019="true"
@@ -299,6 +300,7 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
fi
eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
eval VCRUNTIME_1_NAME="\${VS_VCRUNTIME_1_${VS_VERSION}}"
eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
eval USE_UCRT="\${VS_USE_UCRT_${VS_VERSION}}"
eval VS_SUPPORTED="\${VS_SUPPORTED_${VS_VERSION}}"
@@ -365,6 +367,7 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
eval VCRUNTIME_1_NAME="\${VS_VCRUNTIME_1_${VS_VERSION}}"
eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
eval USE_UCRT="\${VS_USE_UCRT_${VS_VERSION}}"
eval VS_SUPPORTED="\${VS_SUPPORTED_${VS_VERSION}}"
@@ -802,6 +805,31 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
AC_SUBST(MSVCP_DLL)
fi
AC_ARG_WITH(vcruntime-1-dll, [AS_HELP_STRING([--with-vcruntime-1-dll],
[path to microsoft C++ runtime dll (vcruntime*_1.dll) (Windows only) @<:@probed@:>@])])
if test "x$VCRUNTIME_1_NAME" != "x"; then
if test "x$with_vcruntime_1_dll" != x; then
# If given explicitly by user, do not probe. If not present, fail directly.
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($VCRUNTIME_1_NAME, [$with_vcruntime_1_dll],
[--with-vcruntime-1-dll])
if test "x$MSVC_DLL" = x; then
AC_MSG_ERROR([Could not find a proper $VCRUNTIME_1_NAME as specified by --with-vcruntime-1-dll])
fi
VCRUNTIME_1_DLL="$MSVC_DLL"
elif test "x$DEVKIT_VCRUNTIME_1_DLL" != x; then
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($VCRUNTIME_1_NAME, [$DEVKIT_VCRUNTIME_1_DLL], [devkit])
if test "x$MSVC_DLL" = x; then
AC_MSG_ERROR([Could not find a proper $VCRUNTIME_1_NAME as specified by devkit])
fi
VCRUNTIME_1_DLL="$MSVC_DLL"
else
TOOLCHAIN_SETUP_MSVC_DLL([${VCRUNTIME_1_NAME}])
VCRUNTIME_1_DLL="$MSVC_DLL"
fi
AC_SUBST(VCRUNTIME_1_DLL)
fi
AC_ARG_WITH(ucrt-dll-dir, [AS_HELP_STRING([--with-ucrt-dll-dir],
[path to Microsoft Windows Kit UCRT DLL dir (Windows only) @<:@probed@:>@])])

0 comments on commit d4828d7

Please sign in to comment.