Skip to content
Permalink
Browse files
Merge jdk
Merge tag 'jdk-16+5'
  • Loading branch information
David Simms committed Aug 24, 2020
2 parents c75f0f1 + 4d2b0b5 commit cd5c75f8ad82cc01620070bfd5f02df01b704825
Showing 435 changed files with 11,045 additions and 4,427 deletions.
@@ -650,3 +650,7 @@ f143729ca00ec14a98ea5c7f73acba88da97746e jdk-15+23
bcbe7b8a77b8971bc221c0be1bd2abb6fb68c2d0 jdk-16+2
b58fc60580550a4a587cab729d8fd87223ad6932 jdk-15+29
76810b3a88c8c641ae3850a8dfd7c40c984aea9d jdk-16+3
6909e4a1f25bfe9a2727026f5845fc1fc44a36aa jdk-15+30
78c07dd7240412e60d8694e9dbfd46e57bd42ee0 jdk-16+4
78c07dd7240412e60d8694e9dbfd46e57bd42ee0 jdk-16+4
e2622818f0bd30e736252eba101fe7d2c27f400b jdk-16+4
@@ -52,7 +52,6 @@ TARGETS =
# READMEs and other files.

DEMO_SHARE_SRC := $(TOPDIR)/src/demo/share
GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc

DEMO_MANIFEST := $(SUPPORT_OUTPUTDIR)/demos/java-main-manifest.mf

@@ -477,6 +477,7 @@ jdk.internal.vm.compiler_EXCLUDES += \
org.graalvm.compiler.options.test \
org.graalvm.compiler.phases.common.test \
org.graalvm.compiler.processor \
org.graalvm.compiler.replacements.jdk10.test \
org.graalvm.compiler.replacements.jdk12.test \
org.graalvm.compiler.replacements.jdk9.test \
org.graalvm.compiler.replacements.processor \
@@ -640,6 +640,20 @@ $(eval $(call SetupTarget, test-image-jdk-jtreg-native, \
DEPS := build-test-jdk-jtreg-native, \
))

# Native files needed by the testlib
$(eval $(call SetupTarget, build-test-lib-native, \
MAKEFILE := test/BuildTestLibNative, \
TARGET := build-test-lib-native, \
DEPS := buildtools-jdk java.base-libs, \
))

$(eval $(call SetupTarget, test-image-lib-native, \
MAKEFILE := test/BuildTestLibNative, \
TARGET := test-image-lib-native, \
DEPS := build-test-lib-native, \
))

# Native files needed when testing the testlib itself
$(eval $(call SetupTarget, build-test-libtest-jtreg-native, \
MAKEFILE := test/JtregNativeLibTest, \
TARGET := build-test-libtest-jtreg-native, \
@@ -1118,7 +1132,9 @@ endif
docs-image: docs-jdk

# This target builds the test image
test-image: prepare-test-image test-image-jdk-jtreg-native test-image-demos-jdk test-image-libtest-jtreg-native
test-image: prepare-test-image test-image-jdk-jtreg-native \
test-image-demos-jdk test-image-libtest-jtreg-native \
test-image-lib-native

ifneq ($(JVM_TEST_IMAGE_TARGETS), )
# If JVM_TEST_IMAGE_TARGETS is externally defined, use it instead of the
@@ -64,39 +64,12 @@ AC_DEFUN([FLAGS_SETUP_RCFLAGS],
[
# On Windows, we need to set RC flags.
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
RC_FLAGS="-nologo -l0x409"
JVM_RCFLAGS="-nologo"
RCFLAGS="-nologo"
if test "x$DEBUG_LEVEL" = xrelease; then
RC_FLAGS="$RC_FLAGS -DNDEBUG"
JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
RCFLAGS="$RCFLAGS -DNDEBUG"
fi
# The version variables used to create RC_FLAGS may be overridden
# in a custom configure script, or possibly the command line.
# Let those variables be expanded at make time in spec.gmk.
# The \$ are escaped to the shell, and the $(...) variables
# are evaluated by make.
RC_FLAGS="$RC_FLAGS \
-D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
-D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
-D\"JDK_FILEDESC=\$(JDK_RC_NAME) binary\" \
-D\"JDK_VER=\$(VERSION_NUMBER)\" \
-D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
-D\"JDK_NAME=\$(JDK_RC_NAME) \$(VERSION_FEATURE)\" \
-D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
JVM_RCFLAGS="$JVM_RCFLAGS \
-D\"HS_VERSION_STRING=\$(VERSION_STRING)\" \
-D\"HS_COMPANY=\$(COMPANY_NAME)\" \
-D\"HS_VER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
-D\"HS_INTERNAL_NAME=jvm\" \
-D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
-D\"HS_FNAME=jvm.dll\" \
-D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
-D\"HS_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
fi
AC_SUBST(RC_FLAGS)
AC_SUBST(JVM_RCFLAGS)
AC_SUBST(RCFLAGS)
])

################################################################################
@@ -87,6 +87,20 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBFFI],
[LIBFFI_FOUND=no]
)
fi
# on macos we need a special case for system's libffi as
# headers are located only in sdk in $SYSROOT and in ffi subfolder
if test "x$LIBFFI_FOUND" = xno; then
if test "x$SYSROOT" != "x"; then
AC_CHECK_HEADER([$SYSROOT/usr/include/ffi/ffi.h],
[
LIBFFI_FOUND=yes
LIBFFI_CFLAGS="-I${SYSROOT}/usr/include/ffi"
LIBFFI_LIBS=-lffi
],
[LIBFFI_FOUND=no]
)
fi
fi
if test "x$LIBFFI_FOUND" = xno; then
HELP_MSG_MISSING_DEPENDENCY([ffi])
AC_MSG_ERROR([Could not find libffi! $HELP_MSG])
@@ -494,7 +494,6 @@ JVM_CFLAGS := @JVM_CFLAGS@
JVM_LDFLAGS := @JVM_LDFLAGS@
JVM_ASFLAGS := @JVM_ASFLAGS@
JVM_LIBS := @JVM_LIBS@
JVM_RCFLAGS := @JVM_RCFLAGS@

# These flags might contain variables set by a custom extension that is included later.
EXTRA_CFLAGS = @EXTRA_CFLAGS@
@@ -665,12 +664,7 @@ NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS)

JLINK_KEEP_PACKAGED_MODULES:=@JLINK_KEEP_PACKAGED_MODULES@

# Base flags for RC
# Guarding this against resetting value. Legacy make files include spec multiple
# times.
ifndef RC_FLAGS
RC_FLAGS:=@RC_FLAGS@
endif
RCFLAGS := @RCFLAGS@

# Tools adhering to a minimal and common standard of posix compliance.
AWK:=@AWK@
@@ -58,7 +58,7 @@ AC_DEFUN([UTIL_REWRITE_AS_WINDOWS_MIXED_PATH],
base=`basename "$unix_path"`
windows_path=`$WSLPATH -m "$dir"`/"$base"
if test $? -ne 0; then
AC_MSG_ERROR([Cannot convert \"$unix_path\" to Windows path])
AC_MSG_ERROR([Cannot convert "$unix_path" to Windows path])
fi
fi
$1="$windows_path"
@@ -1,5 +1,5 @@
#
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018, 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
@@ -92,6 +92,16 @@ ProcessDir = \
) \
)

GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc

JDK_RCFLAGS=$(RCFLAGS) \
-D"JDK_VERSION_STRING=$(VERSION_STRING)" \
-D"JDK_COMPANY=$(COMPANY_NAME)" \
-D"JDK_VER=$(VERSION_NUMBER_FOUR_POSITIONS)" \
-D"JDK_COPYRIGHT=Copyright \xA9 $(COPYRIGHT_YEAR)" \
-D"JDK_NAME=$(JDK_RC_NAME) $(VERSION_SHORT)" \
-D"JDK_FVER=$(subst .,$(COMMA),$(VERSION_NUMBER_FOUR_POSITIONS))"

# Setup make rules for creating a native shared library with suitable defaults
# for the OpenJDK project.
#
@@ -100,14 +110,15 @@ ProcessDir = \
#
# Remaining parameters are named arguments. These are all passed on to
# SetupNativeCompilation, except for
# EXTRA_RC_FLAGS -- additional RC_FLAGS to append.
# EXTRA_RCFLAGS -- additional RCFLAGS to append.
# EXTRA_HEADER_DIRS -- additional directories to look for headers in
# EXTRA_SRC -- additional directories to look for source in
# EXCLUDE_SRC_PATTERNS -- exclude source dirs matching these patterns from
# appearing in SRC.
# HEADERS_FROM_SRC -- if false, does not add source dirs automatically as
# header include dirs. (Defaults to true.)
# SRC -- this is passed on, but preprocessed to accept source dir designations
# RC_FILEDESC -- override the default FILEDESC for Windows version.rc
# such as "java.base:headers".
SetupJdkLibrary = $(NamedParamsMacroTemplate)
define SetupJdkLibraryBody
@@ -137,19 +148,20 @@ define SetupJdkLibraryBody

ifeq ($$($1_VERSIONINFO_RESOURCE), )
$1_VERSIONINFO_RESOURCE := $$(GLOBAL_VERSION_INFO_RESOURCE)
else ifeq ($$($1_VERSIONINFO_RESOURCE), DISABLE)
$1_VERSIONINFO_RESOURCE :=
endif

ifeq ($$($1_RC_FLAGS), )
$1_RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$$($1_NAME).dll" \
-D "JDK_INTERNAL_NAME=$$($1_NAME)" \
-D "JDK_FTYPE=0x2L"
else ifeq ($$($1_RC_FLAGS), DISABLE)
$1_RC_FLAGS :=
ifeq ($$($1_RC_FILEDESC), )
$1_RC_FILEDESC := $(JDK_RC_NAME) binary
endif

$1_RCFLAGS := $(JDK_RCFLAGS) \
-D"JDK_FILEDESC=$$(strip $$($1_RC_FILEDESC))" \
-D"JDK_FNAME=$$($1_NAME).dll" \
-D"JDK_INTERNAL_NAME=$$($1_NAME)" \
-D"JDK_FTYPE=0x2L" \
-I$(TOPDIR)/src/java.base/windows/native/common \
$$($1_EXTRA_RCFLAGS)

ifneq ($$($1_HEADERS_FROM_SRC), false)
$1_SRC_HEADER_FLAGS := $$(addprefix -I, $$(wildcard $$($1_SRC)))
endif
@@ -171,7 +183,6 @@ define SetupJdkLibraryBody
ifeq ($$($1_CFLAGS)$$($1_CXXFLAGS), )
$1_CFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_EXTRA_HEADER_FLAGS)
endif
$1_RC_FLAGS += $$($1_EXTRA_RC_FLAGS)

# Since we reuse the rule name ($1), all our arguments will pass through.
# We lose in transparency, but gain in brevity in this call...
@@ -186,7 +197,7 @@ endef
#
# Remaining parameters are named arguments. These are all passed on to
# SetupNativeCompilation, except for
# EXTRA_RC_FLAGS -- additional RC_FLAGS to append.
# EXTRA_RCFLAGS -- additional RCFLAGS to append.
SetupJdkExecutable = $(NamedParamsMacroTemplate)
define SetupJdkExecutableBody
$1_TYPE := EXECUTABLE
@@ -201,20 +212,15 @@ define SetupJdkExecutableBody

ifeq ($$($1_VERSIONINFO_RESOURCE), )
$1_VERSIONINFO_RESOURCE := $$(GLOBAL_VERSION_INFO_RESOURCE)
else ifeq ($$($1_VERSIONINFO_RESOURCE), DISABLE)
$1_VERSIONINFO_RESOURCE :=
endif

ifeq ($$($1_RC_FLAGS), )
$1_RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$$($1_NAME).exe" \
-D "JDK_INTERNAL_NAME=$$($1_NAME)" \
-D "JDK_FTYPE=0x01L"
else ifeq ($$($1_RC_FLAGS), DISABLE)
$1_RC_FLAGS :=
endif

$1_RC_FLAGS += $$($1_EXTRA_RC_FLAGS)
$1_RCFLAGS := $(JDK_RCFLAGS) \
-D"JDK_FILEDESC=$(JDK_RC_NAME) binary" \
-D"JDK_FNAME=$$($1_NAME).exe" \
-D"JDK_INTERNAL_NAME=$$($1_NAME)" \
-D"JDK_FTYPE=0x1L" \
-I$(TOPDIR)/src/java.base/windows/native/common \
$$($1_EXTRA_RCFLAGS)

# Since we reuse the rule name ($1), all our arguments will pass through.
# We lose in transparency, but gain in brevity in this call...
@@ -346,6 +346,7 @@ $(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \
sub(/\/\*.*\*\//, ""); \
gsub(/^ +\*.*/, ""); \
gsub(/ /, ""); \
gsub(/\r/, ""); \
printf(" %s", $$0) } \
END { printf("\n") }' $m && \
$(PRINTF) "TRANSITIVE_MODULES_$(call GetModuleNameFromModuleInfo, $m) :=" && \
@@ -359,6 +360,7 @@ $(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \
sub(/\/\*.*\*\//, ""); \
gsub(/^ +\*.*/, ""); \
gsub(/ /, ""); \
gsub(/\r/, ""); \
printf(" %s", $$0) } \
END { printf("\n") }' $m \
) >> $@ $(NEWLINE))
@@ -457,7 +457,7 @@ endef
# EXTRA_OBJECT_FILES List of extra object files to include when linking
# EXTRA_DEPS List of extra dependencies to be added to each compiled file
# VERSIONINFO_RESOURCE Input file for RC. Setting this implies that RC will be run
# RC_FLAGS flags for RC.
# RCFLAGS flags for RC.
# EMBED_MANIFEST if true, embed manifest on Windows.
# MAPFILE mapfile
# USE_MAPFILE_FOR_SYMBOLS if true and this is a STATIC_BUILD, just copy the
@@ -860,23 +860,23 @@ define SetupNativeCompilationBody
-include $$($1_RES_DEPS_FILE)
-include $$($1_RES_DEPS_TARGETS_FILE)

$1_RES_VARDEPS := $$($1_RC) $$($1_RC_FLAGS)
$1_RES_VARDEPS := $$($1_RC) $$($1_RCFLAGS)
$1_RES_VARDEPS_FILE := $$(call DependOnVariable, $1_RES_VARDEPS, \
$$($1_RES).vardeps)

$$($1_RES): $$($1_VERSIONINFO_RESOURCE) $$($1_RES_VARDEPS_FILE)
$$(call LogInfo, Compiling resource $$(notdir $$($1_VERSIONINFO_RESOURCE)) (for $$($1_BASENAME)))
$$(call MakeDir, $$(@D) $$($1_OBJECT_DIR))
$$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \
$$($1_RC) $$($1_RC_FLAGS) $$($1_SYSROOT_CFLAGS) $(CC_OUT_OPTION)$$@ \
$$($1_RC) $$($1_RCFLAGS) $$($1_SYSROOT_CFLAGS) $(CC_OUT_OPTION)$$@ \
$$($1_VERSIONINFO_RESOURCE) 2>&1 ))
# Windows RC compiler does not support -showIncludes, so we mis-use CL
# for this. Filter out RC specific arguments that are unknown to CL.
# For some unknown reason, in this case CL actually outputs the show
# includes to stderr so need to redirect it to hide the output from the
# main log.
$$(call ExecuteWithLog, $$($1_RES_DEPS_FILE).obj, \
$$($1_CC) $$(filter-out -l%, $$($1_RC_FLAGS)) \
$$($1_CC) $$(filter-out -l%, $$($1_RCFLAGS)) \
$$($1_SYSROOT_CFLAGS) -showIncludes -nologo -TC \
$(CC_OUT_OPTION)$$($1_RES_DEPS_FILE).obj -P -Fi$$($1_RES_DEPS_FILE).pp \
$$($1_VERSIONINFO_RESOURCE)) 2>&1 \
@@ -48,7 +48,6 @@ LAUNCHER_CFLAGS += -I$(TOPDIR)/src/java.base/share/native/launcher \
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjli \
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjli \
#
GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc
MACOSX_PLIST_DIR := $(TOPDIR)/src/java.base/macosx/native/launcher
JAVA_MANIFEST := $(TOPDIR)/src/java.base/windows/native/launcher/java.manifest

@@ -71,7 +70,7 @@ JAVA_MANIFEST := $(TOPDIR)/src/java.base/windows/native/launcher/java.manifest
# compile time defines exceeding Visual Studio 2013 limitations.
# CFLAGS Additional CFLAGS
# CFLAGS_windows Additional CFLAGS_windows
# EXTRA_RC_FLAGS Additional EXTRA_RC_FLAGS
# EXTRA_RCFLAGS Additional EXTRA_RCFLAGS
# MACOSX_PRIVILEGED On macosx, allow to access other processes
# OPTIMIZATION Override default optimization level (LOW)
# OUTPUT_DIR Override default output directory
@@ -160,7 +159,7 @@ define SetupBuildLauncherBody
$(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib, \
OUTPUT_DIR := $$($1_OUTPUT_DIR), \
VERSIONINFO_RESOURCE := $$($1_VERSION_INFO_RESOURCE), \
EXTRA_RC_FLAGS := $$($1_EXTRA_RC_FLAGS), \
EXTRA_RCFLAGS := $$($1_EXTRA_RCFLAGS), \
MANIFEST := $(JAVA_MANIFEST), \
MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS), \
))
@@ -27,8 +27,6 @@ include JdkNativeCompilation.gmk

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

GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc

# Absolute paths to lib files on windows for use in LIBS. Should figure out a more
# elegant solution to this.
WIN_JAVA_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib

0 comments on commit cd5c75f

Please sign in to comment.