make/Images.gmk
changeset 37653 3aff5316640d
parent 36725 f458544b0d76
child 37770 9f040cf69078
equal deleted inserted replaced
37652:67e98335455c 37653:3aff5316640d
   421   SYMBOLS_TARGETS += $(COPY_JDK_GCOV_GCNO)
   421   SYMBOLS_TARGETS += $(COPY_JDK_GCOV_GCNO)
   422 
   422 
   423 endif
   423 endif
   424 
   424 
   425 ################################################################################
   425 ################################################################################
       
   426 # Debug symbols
       
   427 # Since debug symbols are not included in the jmod files, they need to be copied
       
   428 # in manually after generating the images.
       
   429 
       
   430 ALL_JDK_MODULES := $(JDK_MODULES)
       
   431 ALL_JRE_MODULES := $(sort $(JRE_MODULES), $(foreach m, $(JRE_MODULES), \
       
   432     $(call FindTransitiveDepsForModule, $m)))
       
   433 
       
   434 ifeq ($(OPENJDK_TARGET_OS), windows)
       
   435   LIBS_TARGET_SUBDIR := bin
       
   436 else
       
   437   LIBS_TARGET_SUBDIR := lib
       
   438 endif
       
   439 
       
   440 DEBUGINFO_SUFFIXES := .diz .debuginfo .pdb .map
       
   441 
       
   442 # Param 1 - dir to find debuginfo files in
       
   443 FindDebuginfoFiles = \
       
   444     $(wildcard $(addprefix $1/*, $(DEBUGINFO_SUFFIXES)) \
       
   445         $(addprefix $1/*/*, $(DEBUGINFO_SUFFIXES)) \
       
   446         $(addprefix $1/*/*/*, $(DEBUGINFO_SUFFIXES)))
       
   447 
       
   448 # On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM
       
   449 # dirs.
       
   450 ifeq ($(OPENJDK_TARGET_OS)-$(ZIP_EXTERNAL_DEBUG_SYMBOLS), macosx-false)
       
   451   $(eval $(call FillCacheFind, \
       
   452       $(SUPPORT_OUTPUTDIR)/modules_cmds $(SUPPORT_OUTPUTDIR)/modules_libs/))
       
   453   FindDebuginfoFiles = \
       
   454       $(if $(wildcard $1), $(call containing, .dSYM/, $(call CacheFind, $1)))
       
   455 endif
       
   456 
       
   457 # Param 1 - either JDK or JRE
       
   458 SetupCopyDebuginfo = \
       
   459     $(foreach m, $(ALL_$1_MODULES), \
       
   460       $(eval $(call SetupCopyFiles, COPY_$1_LIBS_DEBUGINFO_$m, \
       
   461           SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$m, \
       
   462           DEST := $($1_IMAGE_DIR)/$(LIBS_TARGET_SUBDIR), \
       
   463           FILES := $(call FindDebuginfoFiles, \
       
   464               $(SUPPORT_OUTPUTDIR)/modules_libs/$m), \
       
   465       )) \
       
   466       $(eval $1_TARGETS += $$(COPY_$1_LIBS_DEBUGINFO_$m)) \
       
   467     )
       
   468 
       
   469 # No space before argument to avoid having to put $(strip ) everywhere in
       
   470 # implementation above.
       
   471 $(call SetupCopyDebuginfo,JDK)
       
   472 $(call SetupCopyDebuginfo,JRE)
       
   473 
       
   474 ################################################################################
   426 
   475 
   427 # Include custom post hook here to make it possible to augment the target lists
   476 # Include custom post hook here to make it possible to augment the target lists
   428 # before actual target prerequisites are declared.
   477 # before actual target prerequisites are declared.
   429 $(eval $(call IncludeCustomExtension, , Images-post.gmk))
   478 $(eval $(call IncludeCustomExtension, , Images-post.gmk))
   430 
   479