mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-14 01:43:13 +00:00
8155632: Remove debuginfo from jmod files
Reviewed-by: tbell, mchung, alanb
This commit is contained in:
parent
c4275c858c
commit
8a708bda63
@ -82,7 +82,7 @@ $(IMAGES_OUTPUTDIR)/jmods/$(MODULE).jmod: $(DEPS)
|
||||
--os-version $(REQUIRED_OS_VERSION) \
|
||||
--modulepath $(IMAGES_OUTPUTDIR)/jmods\
|
||||
--hash-dependencies '.*' \
|
||||
--exclude '**_the.*' \
|
||||
--exclude '**{_the.*,*.diz,*.debuginfo,*.dSYM/**,*.pdb,*.map}' \
|
||||
$(JMOD_FLAGS) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@)
|
||||
$(MV) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) $@
|
||||
|
||||
|
||||
@ -422,6 +422,55 @@ ifeq ($(GCOV_ENABLED), true)
|
||||
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Debug symbols
|
||||
# Since debug symbols are not included in the jmod files, they need to be copied
|
||||
# in manually after generating the images.
|
||||
|
||||
ALL_JDK_MODULES := $(JDK_MODULES)
|
||||
ALL_JRE_MODULES := $(sort $(JRE_MODULES), $(foreach m, $(JRE_MODULES), \
|
||||
$(call FindTransitiveDepsForModule, $m)))
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
LIBS_TARGET_SUBDIR := bin
|
||||
else
|
||||
LIBS_TARGET_SUBDIR := lib
|
||||
endif
|
||||
|
||||
DEBUGINFO_SUFFIXES := .diz .debuginfo .pdb .map
|
||||
|
||||
# Param 1 - dir to find debuginfo files in
|
||||
FindDebuginfoFiles = \
|
||||
$(wildcard $(addprefix $1/*, $(DEBUGINFO_SUFFIXES)) \
|
||||
$(addprefix $1/*/*, $(DEBUGINFO_SUFFIXES)) \
|
||||
$(addprefix $1/*/*/*, $(DEBUGINFO_SUFFIXES)))
|
||||
|
||||
# On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM
|
||||
# dirs.
|
||||
ifeq ($(OPENJDK_TARGET_OS)-$(ZIP_EXTERNAL_DEBUG_SYMBOLS), macosx-false)
|
||||
$(eval $(call FillCacheFind, \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_cmds $(SUPPORT_OUTPUTDIR)/modules_libs/))
|
||||
FindDebuginfoFiles = \
|
||||
$(if $(wildcard $1), $(call containing, .dSYM/, $(call CacheFind, $1)))
|
||||
endif
|
||||
|
||||
# Param 1 - either JDK or JRE
|
||||
SetupCopyDebuginfo = \
|
||||
$(foreach m, $(ALL_$1_MODULES), \
|
||||
$(eval $(call SetupCopyFiles, COPY_$1_LIBS_DEBUGINFO_$m, \
|
||||
SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$m, \
|
||||
DEST := $($1_IMAGE_DIR)/$(LIBS_TARGET_SUBDIR), \
|
||||
FILES := $(call FindDebuginfoFiles, \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_libs/$m), \
|
||||
)) \
|
||||
$(eval $1_TARGETS += $$(COPY_$1_LIBS_DEBUGINFO_$m)) \
|
||||
)
|
||||
|
||||
# No space before argument to avoid having to put $(strip ) everywhere in
|
||||
# implementation above.
|
||||
$(call SetupCopyDebuginfo,JDK)
|
||||
$(call SetupCopyDebuginfo,JRE)
|
||||
|
||||
################################################################################
|
||||
|
||||
# Include custom post hook here to make it possible to augment the target lists
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user