Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 3 additions & 50 deletions make/Bundles.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -185,77 +185,30 @@ endif

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

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

# There may be files with spaces in the names, so use ShellFindFiles
# explicitly.
# There may be files with spaces in the names, so use ShellFindFiles explicitly.
ALL_JDK_FILES := $(call ShellFindFiles, $(JDK_IMAGE_DIR))
ifneq ($(JDK_IMAGE_DIR), $(JDK_SYMBOLS_IMAGE_DIR))
ALL_JDK_SYMBOLS_FILES := $(call ShellFindFiles, $(JDK_SYMBOLS_IMAGE_DIR))
else
ALL_JDK_SYMBOLS_FILES := $(ALL_JDK_FILES)
endif
ifneq ($(JDK_IMAGE_DIR), $(JDK_DEMOS_IMAGE_DIR))
ALL_JDK_DEMOS_FILES := $(call ShellFindFiles, $(JDK_DEMOS_IMAGE_DIR))
else
ALL_JDK_DEMOS_FILES := $(ALL_JDK_FILES)
endif

# Create special filter rules when dealing with unzipped .dSYM directories on
# macosx
ifeq ($(call isTargetOs, macosx), true)
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
$(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, \
$(ALL_JDK_SYMBOLS_FILES))))
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
endif
endif

JDK_BUNDLE_FILES := \
$(filter-out \
$(JDK_SYMBOLS_EXCLUDE_PATTERN) \
$(JDK_EXTRA_EXCLUDES) \
$(SYMBOLS_EXCLUDE_PATTERN) \
$(JDK_IMAGE_HOMEDIR)/demo/% \
, \
$(ALL_JDK_FILES) \
)

JDK_SYMBOLS_BUNDLE_FILES := \
$(call FindFiles, $(SYMBOLS_IMAGE_DIR))
JDK_SYMBOLS_BUNDLE_FILES := $(call FindFiles, $(SYMBOLS_IMAGE_DIR))

TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_DEMOS_IMAGE_HOMEDIR)/demo/%, \
$(ALL_JDK_DEMOS_FILES))

ALL_JRE_FILES := $(call ShellFindFiles, $(JRE_IMAGE_DIR))

# Create special filter rules when dealing with unzipped .dSYM directories on
# macosx
ifeq ($(OPENJDK_TARGET_OS), macosx)
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
JRE_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
$(call containing, .dSYM/, $(patsubst $(JRE_IMAGE_DIR)/%, %, $(ALL_JRE_FILES))))
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
endif
endif

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

ifeq ($(MACOSX_CODESIGN_MODE), hardened)
# Macosx release build and code signing available.
Expand Down
8 changes: 6 additions & 2 deletions make/CreateJmods.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,14 @@ 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}'
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.map}'
endif
else
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
ifeq ($(SHIP_DEBUG_SYMBOLS), )
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
else
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*}'
endif
endif

# Unless we are creating a very large module, use the small tool JVM options
Expand Down
27 changes: 20 additions & 7 deletions make/autoconf/jdk-options.m4
Original file line number Diff line number Diff line change
Expand Up @@ -316,23 +316,36 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
AC_MSG_CHECKING([if we should add external native debug symbols to the shipped bundles])
AC_ARG_WITH([external-symbols-in-bundles],
[AS_HELP_STRING([--with-external-symbols-in-bundles],
[which type of external native debug symbol information shall be shipped in product bundles (none, public, full)
(e.g. ship full/stripped pdbs on Windows) @<:@none@:>@])])
[which type of external native debug symbol information shall be shipped with bundles/images (none, public, full).
@<:@none in release builds, full otherwise. --with-native-debug-symbols=external/zipped is a prerequisite. public is only supported on Windows@:>@])],
[],
[with_external_symbols_in_bundles=default])

if test "x$with_external_symbols_in_bundles" = x || test "x$with_external_symbols_in_bundles" = xnone ; then
AC_MSG_RESULT([no])
elif test "x$with_external_symbols_in_bundles" = xfull || test "x$with_external_symbols_in_bundles" = xpublic ; then
if test "x$OPENJDK_TARGET_OS" != xwindows ; then
AC_MSG_ERROR([--with-external-symbols-in-bundles currently only works on windows!])
elif test "x$COPY_DEBUG_SYMBOLS" != xtrue ; then
AC_MSG_ERROR([--with-external-symbols-in-bundles only works when --with-native-debug-symbols=external is used!])
elif test "x$with_external_symbols_in_bundles" = xfull ; then
if test "x$COPY_DEBUG_SYMBOLS" != xtrue ; then
AC_MSG_ERROR([--with-external-symbols-in-bundles only works when --with-native-debug-symbols=external/zipped is used!])
elif test "x$with_external_symbols_in_bundles" = xpublic && test "x$OPENJDK_TARGET_OS" != xwindows ; then
AC_MSG_ERROR([--with-external-symbols-in-bundles=public is only supported on Windows!])
fi

if test "x$with_external_symbols_in_bundles" = xfull ; then
AC_MSG_RESULT([full])
SHIP_DEBUG_SYMBOLS=full
else
AC_MSG_RESULT([public])
SHIP_DEBUG_SYMBOLS=public
fi
elif test "x$with_external_symbols_in_bundles" = xdefault ; then
if test "x$DEBUG_LEVEL" = xrelease ; then
AC_MSG_RESULT([no (default)])
elif test "x$COPY_DEBUG_SYMBOLS" = xtrue ; then
AC_MSG_RESULT([full (default)])
SHIP_DEBUG_SYMBOLS=full
else
AC_MSG_RESULT([no (default, native debug symbols are not external/zipped)])
fi
else
AC_MSG_ERROR([$with_external_symbols_in_bundles is an unknown value for --with-external-symbols-in-bundles])
fi
Expand Down