< prev index next >

make/Images.gmk

Print this page
*** 170,10 ***
--- 170,36 ---
  
    JRE_TARGETS += $$($1_$2_gen_cds_archive_jre)
  endef
  
  ifeq ($(BUILD_CDS_ARCHIVE), true)
+ 
+ CLASSLIST_REFRESH := $(SUPPORT_OUTPUTDIR)/images/jdk/classlist.refresh
+ 
+ # The classlist generated by GenerateLinkOptData.gmk uses the Holder classes from
+ # the intermin image, which are different than the ones in the final JDK image. So
+ # we need to generate the images/jdk/lib/classlist again
+ #
+ # FIXME: it's better to do this inside GenerateLinkOptData.gmk, but I don't know how ....
+ $(CLASSLIST_REFRESH): $(jlink_jdk)
+ 	$(call LogWarn, Refresh classlist for jdk image)
+ 	$(FIXPATH) $(JDK_IMAGE_DIR)/bin/java -Xshare:off \
+             -XX:DumpLoadedClassList=$@.raw \
+ 	    -Duser.language=en -Duser.country=US \
+ 	    -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
+ 	    build.tools.classlist.HelloClasslist \
+ 	    2> $@.stderr > $@.stdout
+ 	$(CAT) $@.raw \
+ 	    | $(GREP) -v HelloClasslist \
+ 	    > $@.raw.2
+ 	$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java \
+ 	    -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
+ 	    build.tools.classlist.SortClasslist $@.raw.2 > $@
+ 	$(CP) -v $@ $(JDK_IMAGE_DIR)/lib/classlist
+ 
+ JDK_TARGETS += $(CLASSLIST_REFRESH)
+ 
    $(foreach v, $(JVM_VARIANTS), \
      $(eval $(call CreateCDSArchive,$v,)) \
    )
  
    ifeq ($(call isTargetCpuBits, 64), true)
< prev index next >