Skip to content

Commit 90e53c9

Browse files
author
duke
committed
Backport b5ac8f83682ddb9623a1b43bd62f309b2961a504
1 parent 2946429 commit 90e53c9

3 files changed

Lines changed: 29 additions & 59 deletions

File tree

make/Bundles.gmk

Lines changed: 3 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -185,77 +185,30 @@ endif
185185

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

188-
SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.map
189-
190-
# There may be files with spaces in the names, so use ShellFindFiles
191-
# explicitly.
188+
# There may be files with spaces in the names, so use ShellFindFiles explicitly.
192189
ALL_JDK_FILES := $(call ShellFindFiles, $(JDK_IMAGE_DIR))
193-
ifneq ($(JDK_IMAGE_DIR), $(JDK_SYMBOLS_IMAGE_DIR))
194-
ALL_JDK_SYMBOLS_FILES := $(call ShellFindFiles, $(JDK_SYMBOLS_IMAGE_DIR))
195-
else
196-
ALL_JDK_SYMBOLS_FILES := $(ALL_JDK_FILES)
197-
endif
198190
ifneq ($(JDK_IMAGE_DIR), $(JDK_DEMOS_IMAGE_DIR))
199191
ALL_JDK_DEMOS_FILES := $(call ShellFindFiles, $(JDK_DEMOS_IMAGE_DIR))
200192
else
201193
ALL_JDK_DEMOS_FILES := $(ALL_JDK_FILES)
202194
endif
203195

204-
# Create special filter rules when dealing with unzipped .dSYM directories on
205-
# macosx
206-
ifeq ($(call isTargetOs, macosx), true)
207-
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
208-
JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
209-
$(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, \
210-
$(ALL_JDK_SYMBOLS_FILES))))
211-
endif
212-
endif
213-
214-
# Create special filter rules when dealing with debug symbols on windows
215-
ifeq ($(call isTargetOs, windows), true)
216-
ifeq ($(SHIP_DEBUG_SYMBOLS), )
217-
JDK_SYMBOLS_EXCLUDE_PATTERN := %.pdb
218-
endif
219-
endif
220-
221196
JDK_BUNDLE_FILES := \
222197
$(filter-out \
223-
$(JDK_SYMBOLS_EXCLUDE_PATTERN) \
224198
$(JDK_EXTRA_EXCLUDES) \
225-
$(SYMBOLS_EXCLUDE_PATTERN) \
226199
$(JDK_IMAGE_HOMEDIR)/demo/% \
227200
, \
228201
$(ALL_JDK_FILES) \
229202
)
230203

231-
JDK_SYMBOLS_BUNDLE_FILES := \
232-
$(call FindFiles, $(SYMBOLS_IMAGE_DIR))
204+
JDK_SYMBOLS_BUNDLE_FILES := $(call FindFiles, $(SYMBOLS_IMAGE_DIR))
233205

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

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

239-
# Create special filter rules when dealing with unzipped .dSYM directories on
240-
# macosx
241-
ifeq ($(OPENJDK_TARGET_OS), macosx)
242-
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
243-
JRE_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
244-
$(call containing, .dSYM/, $(patsubst $(JRE_IMAGE_DIR)/%, %, $(ALL_JRE_FILES))))
245-
endif
246-
endif
247-
248-
# Create special filter rules when dealing with debug symbols on windows
249-
ifeq ($(call isTargetOs, windows), true)
250-
ifeq ($(SHIP_DEBUG_SYMBOLS), )
251-
JRE_SYMBOLS_EXCLUDE_PATTERN := %.pdb
252-
endif
253-
endif
254-
255-
JRE_BUNDLE_FILES := $(filter-out \
256-
$(JRE_SYMBOLS_EXCLUDE_PATTERN) \
257-
$(SYMBOLS_EXCLUDE_PATTERN), \
258-
$(ALL_JRE_FILES))
211+
JRE_BUNDLE_FILES := $(ALL_JRE_FILES)
259212

260213
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
261214
# Macosx release build and code signing available.

make/CreateJmods.gmk

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,14 @@ ifeq ($(call isTargetOs, windows), true)
218218
ifeq ($(SHIP_DEBUG_SYMBOLS), )
219219
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.pdb,*.map}'
220220
else
221-
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.map}'
221+
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.map}'
222222
endif
223223
else
224-
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
224+
ifeq ($(SHIP_DEBUG_SYMBOLS), )
225+
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
226+
else
227+
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*}'
228+
endif
225229
endif
226230

227231
# Unless we are creating a very large module, use the small tool JVM options

make/autoconf/jdk-options.m4

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -327,23 +327,36 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
327327
AC_MSG_CHECKING([if we should add external native debug symbols to the shipped bundles])
328328
AC_ARG_WITH([external-symbols-in-bundles],
329329
[AS_HELP_STRING([--with-external-symbols-in-bundles],
330-
[which type of external native debug symbol information shall be shipped in product bundles (none, public, full)
331-
(e.g. ship full/stripped pdbs on Windows) @<:@none@:>@])])
330+
[which type of external native debug symbol information shall be shipped with bundles/images (none, public, full).
331+
@<:@none in release builds, full otherwise. --with-native-debug-symbols=external/zipped is a prerequisite. public is only supported on Windows@:>@])],
332+
[],
333+
[with_external_symbols_in_bundles=default])
332334
333335
if test "x$with_external_symbols_in_bundles" = x || test "x$with_external_symbols_in_bundles" = xnone ; then
334336
AC_MSG_RESULT([no])
335337
elif test "x$with_external_symbols_in_bundles" = xfull || test "x$with_external_symbols_in_bundles" = xpublic ; then
336-
if test "x$OPENJDK_TARGET_OS" != xwindows ; then
337-
AC_MSG_ERROR([--with-external-symbols-in-bundles currently only works on windows!])
338-
elif test "x$COPY_DEBUG_SYMBOLS" != xtrue ; then
339-
AC_MSG_ERROR([--with-external-symbols-in-bundles only works when --with-native-debug-symbols=external is used!])
340-
elif test "x$with_external_symbols_in_bundles" = xfull ; then
338+
if test "x$COPY_DEBUG_SYMBOLS" != xtrue ; then
339+
AC_MSG_ERROR([--with-external-symbols-in-bundles only works when --with-native-debug-symbols=external/zipped is used!])
340+
elif test "x$with_external_symbols_in_bundles" = xpublic && test "x$OPENJDK_TARGET_OS" != xwindows ; then
341+
AC_MSG_ERROR([--with-external-symbols-in-bundles=public is only supported on Windows!])
342+
fi
343+
344+
if test "x$with_external_symbols_in_bundles" = xfull ; then
341345
AC_MSG_RESULT([full])
342346
SHIP_DEBUG_SYMBOLS=full
343347
else
344348
AC_MSG_RESULT([public])
345349
SHIP_DEBUG_SYMBOLS=public
346350
fi
351+
elif test "x$with_external_symbols_in_bundles" = xdefault ; then
352+
if test "x$DEBUG_LEVEL" = xrelease ; then
353+
AC_MSG_RESULT([no (default)])
354+
elif test "x$COPY_DEBUG_SYMBOLS" = xtrue ; then
355+
AC_MSG_RESULT([full (default)])
356+
SHIP_DEBUG_SYMBOLS=full
357+
else
358+
AC_MSG_RESULT([no (default, native debug symbols are not external/zipped)])
359+
fi
347360
else
348361
AC_MSG_ERROR([$with_external_symbols_in_bundles is an unknown value for --with-external-symbols-in-bundles])
349362
fi

0 commit comments

Comments
 (0)