Skip to content
Permalink
Browse files
Merge
  • Loading branch information
prsadhuk committed Mar 2, 2020
2 parents 5e912fb + 0532bd2 commit 65bf61852f06e2e5a9d6f4908199bcadbb81e4fb
Showing 1,158 changed files with 30,097 additions and 27,851 deletions.
@@ -619,3 +619,6 @@ c7d4f2849dbfb755fc5860b362a4044ea0c9e082 jdk-15+8
4a87bb7ebfd7f6a25ec59a5982fe3607242777f8 jdk-14+35
62b5bfef8d618e08e6f3a56cf1fb0e67e89e9cc2 jdk-15+9
bc54620a3848c26cff9766e5e2a6e5ddab98ed18 jdk-14+36
1bee69801aeea1a34261c93f35bc9de072a98704 jdk-15+10
b2dd4028a6de4e40dda8b76109e4b5c6b294f980 jdk-15+11
2ec0ff3042630ddbd3587e340fe0dd40391cb6c4 jdk-15+12
@@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2009, 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
@@ -113,6 +113,14 @@ if [ "x$SPEC" = "x" ] ; then
echo "FATAL: SPEC is empty" >&2; exit 1
fi

if [ -d "$TOPLEVEL_DIR/.hg" ] ; then
VCS_TYPE="hg4idea"
fi

if [ -d "$TOPLEVEL_DIR/.git" ] ; then
VCS_TYPE="Git"
fi

### Replace template variables

NUM_REPLACEMENTS=0
@@ -137,6 +145,7 @@ add_replacement() {
}

add_replacement "###MODULE_NAMES###" "$MODULE_NAMES"
add_replacement "###VCS_TYPE###" "$VCS_TYPE"
SPEC_DIR=`dirname $SPEC`
if [ "x$CYGPATH" = "x" ]; then
add_replacement "###BUILD_DIR###" "$SPEC_DIR"
@@ -473,7 +473,7 @@ <h4 id="configure-arguments-for-tailoring-the-build">Configure Arguments for Tai
<li><code>--with-version-string=&lt;string&gt;</code> - Specify the version string this build will be identified with.</li>
<li><code>--with-version-&lt;part&gt;=&lt;value&gt;</code> - A group of options, where <code>&lt;part&gt;</code> can be any of <code>pre</code>, <code>opt</code>, <code>build</code>, <code>major</code>, <code>minor</code>, <code>security</code> or <code>patch</code>. Use these options to modify just the corresponding part of the version string from the default, or the value provided by <code>--with-version-string</code>.</li>
<li><code>--with-jvm-variants=&lt;variant&gt;[,&lt;variant&gt;...]</code> - Build the specified variant (or variants) of Hotspot. Valid variants are: <code>server</code>, <code>client</code>, <code>minimal</code>, <code>core</code>, <code>zero</code>, <code>custom</code>. Note that not all variants are possible to combine in a single build.</li>
<li><code>--with-jvm-features=&lt;feature&gt;[,&lt;feature&gt;...]</code> - Use the specified JVM features when building Hotspot. The list of features will be enabled on top of the default list. For the <code>custom</code> JVM variant, this default list is empty. A complete list of available JVM features can be found using <code>bash configure --help</code>.</li>
<li><code>--enable-jvm-feature-&lt;feature&gt;</code> or <code>--disable-jvm-feature-&lt;feature&gt;</code> - Include (or exclude) <code>&lt;feature&gt;</code> as a JVM feature in Hotspot. You can also specify a list of features to be enabled, separated by space or comma, as <code>--with-jvm-features=&lt;feature&gt;[,&lt;feature&gt;...]</code>. If you prefix <code>&lt;feature&gt;</code> with a <code>-</code>, it will be disabled. These options will modify the default list of features for the JVM variant(s) you are building. For the <code>custom</code> JVM variant, the default list is empty. A complete list of valid JVM features can be found using <code>bash configure --help</code>.</li>
<li><code>--with-target-bits=&lt;bits&gt;</code> - Create a target binary suitable for running on a <code>&lt;bits&gt;</code> platform. Use this to create 32-bit output on a 64-bit build platform, instead of doing a full cross-compile. (This is known as a <em>reduced</em> build.)</li>
</ul>
<p>On Linux, BSD and AIX, it is possible to override where Java by default searches for runtime/JNI libraries. This can be useful in situations where there is a special shared directory for system JNI libraries. This setting can in turn be overriden at runtime by setting the <code>java.library.path</code> property.</p>
@@ -684,11 +684,14 @@ features, use `bash configure --help=short` instead.)
(or variants) of Hotspot. Valid variants are: `server`, `client`,
`minimal`, `core`, `zero`, `custom`. Note that not all
variants are possible to combine in a single build.
* `--with-jvm-features=<feature>[,<feature>...]` - Use the specified JVM
features when building Hotspot. The list of features will be enabled on top
of the default list. For the `custom` JVM variant, this default list is
empty. A complete list of available JVM features can be found using `bash
configure --help`.
* `--enable-jvm-feature-<feature>` or `--disable-jvm-feature-<feature>` -
Include (or exclude) `<feature>` as a JVM feature in Hotspot. You can also
specify a list of features to be enabled, separated by space or comma, as
`--with-jvm-features=<feature>[,<feature>...]`. If you prefix `<feature>`
with a `-`, it will be disabled. These options will modify the default list
of features for the JVM variant(s) you are building. For the `custom` JVM
variant, the default list is empty. A complete list of valid JVM features
can be found using `bash configure --help`.
* `--with-target-bits=<bits>` - Create a target binary suitable for running
on a `<bits>` platform. Use this to create 32-bit output on a 64-bit build
platform, instead of doing a full cross-compile. (This is known as a
@@ -1,5 +1,5 @@
#
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2016, 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
@@ -125,6 +125,13 @@ define SetupBundleFileBody
&& $(TAR) cf - -$(TAR_INCLUDE_PARAM) $$($1_$$d_LIST_FILE) \
$(TAR_IGNORE_EXIT_VALUE) ) \
| ( $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) && $(TAR) xf - )$$(NEWLINE) )
# Rename stripped pdb files
ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.stripped.pdb"`; do \
$(ECHO) Renaming $$$${f} to $$$${f%stripped.pdb}pdb $(LOG_INFO); \
$(MV) $$$${f} $$$${f%stripped.pdb}pdb; \
done
endif
# Unzip any zipped debuginfo files
ifeq ($$($1_UNZIP_DEBUGINFO), true)
for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.diz"`; do \
@@ -183,7 +190,7 @@ endif

ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )

SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.pdb %.map
SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.map

# There may be files with spaces in the names, so use ShellFindFiles
# explicitly.
@@ -209,6 +216,21 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
endif
endif

# Create special filter rules when dealing with debug symbols on windows
ifeq ($(call isTargetOs, windows), true)
ifeq ($(SHIP_DEBUG_SYMBOLS), )
JDK_SYMBOLS_EXCLUDE_PATTERN := %.pdb
else
ifeq ($(SHIP_DEBUG_SYMBOLS), public)
JDK_SYMBOLS_EXCLUDE_PATTERN := \
$(filter-out \
%.stripped.pdb, \
$(filter %.pdb, $(ALL_JDK_FILES)) \
)
endif
endif
endif

JDK_BUNDLE_FILES := \
$(filter-out \
$(JDK_SYMBOLS_EXCLUDE_PATTERN) \
@@ -218,13 +240,14 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
, \
$(ALL_JDK_FILES) \
)

JDK_SYMBOLS_BUNDLE_FILES := \
$(filter \
$(JDK_SYMBOLS_EXCLUDE_PATTERN) \
$(SYMBOLS_EXCLUDE_PATTERN) \
, \
$(filter-out \
$(JDK_IMAGE_HOMEDIR)/demo/% \
$(JDK_IMAGE_HOMEDIR)/demo/% %.stripped.pdb \
, \
$(ALL_JDK_SYMBOLS_FILES) \
) \
@@ -245,29 +268,116 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
endif
endif

# Create special filter rules when dealing with debug symbols on windows
ifeq ($(call isTargetOs, windows), true)
ifeq ($(SHIP_DEBUG_SYMBOLS), )
JRE_SYMBOLS_EXCLUDE_PATTERN := %.pdb
else
ifeq ($(SHIP_DEBUG_SYMBOLS), public)
JRE_SYMBOLS_EXCLUDE_PATTERN := \
$(filter-out \
%.stripped.pdb, \
$(filter %.pdb, $(ALL_JRE_FILES)) \
)
endif
endif
endif

JRE_BUNDLE_FILES := $(filter-out \
$(JRE_SYMBOLS_EXCLUDE_PATTERN) \
$(SYMBOLS_EXCLUDE_PATTERN), \
$(ALL_JRE_FILES))

$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
FILES := $(JDK_BUNDLE_FILES), \
SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \
BASE_DIRS := $(JDK_IMAGE_DIR), \
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
))
# On Macosx release builds, when there is a code signing certificate available,
# the final bundle layout can be signed.
SIGN_BUNDLE := false
ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
ifneq ($(CODESIGN), )
SIGN_BUNDLE := true
endif
endif

PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
ifeq ($(SIGN_BUNDLE), true)
# Macosx release build and code signing available.

$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
FILES := $(JRE_BUNDLE_FILES), \
BASE_DIRS := $(JRE_IMAGE_DIR), \
SUBDIR := $(JRE_BUNDLE_SUBDIR), \
))
################################################################################
# JDK bundle
$(eval $(call SetupCopyFiles, CREATE_JDK_BUNDLE_DIR_SIGNED, \
SRC := $(JDK_IMAGE_DIR), \
FILES := $(JDK_BUNDLE_FILES), \
DEST := $(JDK_MACOSX_BUNDLE_DIR_SIGNED), \
))

LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
JDK_SIGNED_CODE_RESOURCES := \
$(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_CONTENTS_SUBDIR)/_CodeSignature/CodeResources

$(JDK_SIGNED_CODE_RESOURCES): $(CREATE_JDK_BUNDLE_DIR_SIGNED)
$(call LogWarn, Signing $(JDK_BUNDLE_NAME))
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
--timestamp --options runtime --deep --force \
$(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
$(TOUCH) $@

$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
FILES := \
$(CREATE_JDK_BUNDLE_DIR_SIGNED) \
$(JDK_SIGNED_CODE_RESOURCES), \
BASE_DIRS := $(JDK_MACOSX_BUNDLE_DIR_SIGNED), \
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
))

PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)

################################################################################
# JRE bundle
$(eval $(call SetupCopyFiles, CREATE_JRE_BUNDLE_DIR_SIGNED, \
SRC := $(JRE_IMAGE_DIR), \
FILES := $(JRE_BUNDLE_FILES), \
DEST := $(JRE_MACOSX_BUNDLE_DIR_SIGNED), \
))

JRE_SIGNED_CODE_RESOURCES := \
$(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_CONTENTS_SUBDIR)/_CodeSignature/CodeResources

$(JRE_SIGNED_CODE_RESOURCES): $(CREATE_JRE_BUNDLE_DIR_SIGNED)
$(call LogWarn, Signing $(JRE_BUNDLE_NAME))
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
--timestamp --options runtime --deep --force \
$(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
$(TOUCH) $@

$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
FILES := \
$(CREATE_JRE_BUNDLE_DIR_SIGNED) \
$(JRE_SIGNED_CODE_RESOURCES), \
BASE_DIRS := $(JRE_MACOSX_BUNDLE_DIR_SIGNED), \
SUBDIR := $(JRE_BUNDLE_SUBDIR), \
))

LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
else
# Not a Macosx release build or code signing not available.
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
FILES := $(JDK_BUNDLE_FILES), \
SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \
BASE_DIRS := $(JDK_IMAGE_DIR), \
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
))

PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)

$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
FILES := $(JRE_BUNDLE_FILES), \
BASE_DIRS := $(JRE_IMAGE_DIR), \
SUBDIR := $(JRE_BUNDLE_SUBDIR), \
))

LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
endif

ifeq ($(COPY_DEBUG_SYMBOLS), true)
$(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 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
@@ -40,7 +40,6 @@ $(eval $(call IncludeCustomExtension, CompileTools.gmk))
# Use += to be able to add to this from a custom extension
BUILD_TOOLS_SRC_DIRS += \
$(TOPDIR)/make/jdk/src/classes \
$(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes \
$(BUILDTOOLS_OUTPUTDIR)/interim_tzdb_classes \
#

@@ -1,4 +1,5 @@
# Copyright (c) 2014, 2019, 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
@@ -58,12 +59,58 @@ $(call FillFindCache, \
)

ifneq ($(LIBS_DIR), )
JMOD_FLAGS += --libs $(LIBS_DIR)
DEPS += $(call FindFiles, $(LIBS_DIR))
ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
# For public debug symbols on Windows, we have to use stripped pdbs and rename them
rename_stripped = $(patsubst %.stripped.pdb,%.pdb,$1)
LIBS_DIR_FILTERED := $(subst modules_libs,modules_libs_filtered, $(LIBS_DIR))
FILES_LIBS := $(filter-out %.pdb, $(call FindFiles, $(LIBS_DIR))) \
$(filter %.stripped.pdb, $(call FindFiles, $(LIBS_DIR)))
$(eval $(call SetupCopyFiles, COPY_FILTERED_LIBS, \
SRC := $(LIBS_DIR), \
DEST := $(LIBS_DIR_FILTERED), \
FILES := $(FILES_LIBS), \
NAME_MACRO := rename_stripped, \
))
DEPS += $(COPY_FILTERED_LIBS)
JMOD_FLAGS += --libs $(LIBS_DIR_FILTERED)
else
JMOD_FLAGS += --libs $(LIBS_DIR)
endif
endif
ifneq ($(CMDS_DIR), )
JMOD_FLAGS += --cmds $(CMDS_DIR)
DEPS += $(call FindFiles, $(CMDS_DIR))
ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
# For public debug symbols on Windows, we have to use stripped pdbs, rename them
# and filter out a few launcher pdbs where there's a lib that goes by the same name
rename_stripped = $(patsubst %.stripped.pdb,%.pdb,$1)
CMDS_DIR_FILTERED := $(subst modules_cmds,modules_cmds_filtered, $(CMDS_DIR))
FILES_CMDS := $(filter-out %.pdb, $(call FindFiles, $(CMDS_DIR))) \
$(filter-out %jimage.stripped.pdb %jpackage.stripped.pdb %java.stripped.pdb, \
$(filter %.stripped.pdb, $(call FindFiles, $(CMDS_DIR))))
$(eval $(call SetupCopyFiles, COPY_FILTERED_CMDS, \
SRC := $(CMDS_DIR), \
DEST := $(CMDS_DIR_FILTERED), \
FILES := $(FILES_CMDS), \
NAME_MACRO := rename_stripped, \
))
DEPS += $(COPY_FILTERED_CMDS)
JMOD_FLAGS += --cmds $(CMDS_DIR_FILTERED)
else ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+full)
# For full debug symbols on Windows, we have to filter out a few launcher pdbs
# where there's a lib that goes by the same name
CMDS_DIR_FILTERED := $(subst modules_cmds,modules_cmds_filtered, $(CMDS_DIR))
$(eval $(call SetupCopyFiles, COPY_FILTERED_CMDS, \
SRC := $(CMDS_DIR), \
DEST := $(CMDS_DIR_FILTERED), \
FILES := $(filter-out %jimage.pdb %jpackage.pdb %java.pdb, \
$(call FindFiles, $(CMDS_DIR))), \
))
DEPS += $(COPY_FILTERED_CMDS)
JMOD_FLAGS += --cmds $(CMDS_DIR_FILTERED)
else
JMOD_FLAGS += --cmds $(CMDS_DIR)
endif
endif
ifneq ($(CONF_DIR), )
JMOD_FLAGS += --config $(CONF_DIR)
@@ -159,7 +206,15 @@ ifeq ($(INTERIM_JMOD), true)
INTERIM_MSG := interim$(SPACE)
endif

JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM,*.pdb,*.map}'
ifeq ($(call isTargetOs, windows), true)
ifeq ($(SHIP_DEBUG_SYMBOLS), )
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.pdb,*.map}'
else
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.map}'
endif
else
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
endif

# Create jmods in the support dir and then move them into place to keep the
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
@@ -1,5 +1,5 @@
#
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2016, 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
@@ -104,6 +104,17 @@ $(eval $(call SetupCopyFiles, COPY_CLASSLIST, \

TARGETS += $(COPY_CLASSLIST)

# In case of shipping public debug symbols on windows, there is another temporary
# location from where jmods are compiled - need to deploy classlist there, too.
ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
$(eval $(call SetupCopyFiles, COPY_CLASSLIST_TO_FILTERED, \
FILES := $(CLASSLIST_FILE), \
DEST := $(SUPPORT_OUTPUTDIR)/modules_libs_filtered/java.base, \
))

TARGETS += $(COPY_CLASSLIST_TO_FILTERED)
endif

# Copy the default_jli_trace.txt file into jdk.jlink
$(eval $(call SetupCopyFiles, COPY_JLI_TRACE, \
FILES := $(JLI_TRACE_FILE), \

0 comments on commit 65bf618

Please sign in to comment.