< prev index next >

make/Images.gmk

Print this page
@@ -131,66 +131,69 @@
  
  # Helper function for creating the CDS archives for the JDK and JRE
  #
  # Param1 - VM variant (e.g., server, client, zero, ...)
  # Param2 - _nocoops, or empty
+ # Param3 - _valhalla, or empty
  define CreateCDSArchive
-   $1_$2_DUMP_EXTRA_ARG := $(if $(filter _nocoops, $2), -XX:-UseCompressedOops, )
-   $1_$2_DUMP_TYPE      := $(if $(filter _nocoops, $2), -NOCOOPS, )
+   $1_$2_$3_DUMP_EXTRA_ARG := $(if $(filter _nocoops, $2), -XX:-UseCompressedOops,) $(if $(filter _valhalla, $3), --enable-preview,)
+   $1_$2_$3_DUMP_TYPE      := $(if $(filter _nocoops, $2), -NOCOOPS,)$(if $(filter _valhalla, $3), -VALHALLA,)
  
    # Only G1 supports dumping the shared heap, so explicitly use G1 if the JVM supports it.
-   $1_$2_CDS_DUMP_FLAGS := $(CDS_DUMP_FLAGS) $(if $(filter g1gc, $(JVM_FEATURES_$1)), -XX:+UseG1GC)
+   $1_$2_$3_CDS_DUMP_FLAGS := $(CDS_DUMP_FLAGS) $(if $(filter g1gc, $(JVM_FEATURES_$1)), -XX:+UseG1GC)
  
    ifeq ($(OPENJDK_TARGET_OS), windows)
-     $1_$2_CDS_ARCHIVE := bin/$1/classes$2.jsa
+     $1_$2_$3_CDS_ARCHIVE := bin/$1/classes$2$3.jsa
    else
-     $1_$2_CDS_ARCHIVE := lib/$1/classes$2.jsa
+     $1_$2_$3_CDS_ARCHIVE := lib/$1/classes$2$3.jsa
    endif
  
    ifneq ($(COMPARE_BUILD), )
      DEBUG_CDS_ARCHIVE := true
    endif
  
    ifeq ($(DEBUG_CDS_ARCHIVE), true)
      $1_$2_CDS_DUMP_FLAGS += -Xlog:cds+map*=trace:file=$$(JDK_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE).cdsmap:none:filesize=0
    endif
  
-   $$(eval $$(call SetupExecute, $1_$2_gen_cds_archive_jdk, \
-       WARN := Creating CDS$$($1_$2_DUMP_TYPE) archive for jdk image for $1, \
-       INFO := Using CDS flags for $1: $$($1_$2_CDS_DUMP_FLAGS), \
+   $$(eval $$(call SetupExecute, $1_$2_$3_gen_cds_archive_jdk, \
+       WARN := Creating CDS$$($1_$2_$3_DUMP_TYPE) archive for jdk image for $1, \
+       INFO := Using CDS flags for $1: $$($1_$2_$3_CDS_DUMP_FLAGS), \
        DEPS := $$(jlink_jdk), \
-       OUTPUT_FILE := $$(JDK_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE), \
+       OUTPUT_FILE := $$(JDK_IMAGE_DIR)/$$($1_$2_$3_CDS_ARCHIVE), \
        SUPPORT_DIR := $$(JDK_IMAGE_SUPPORT_DIR), \
        COMMAND := $$(FIXPATH) $$(JDK_IMAGE_DIR)/bin/java -Xshare:dump \
-           -XX:SharedArchiveFile=$$(JDK_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE) \
-           -$1 $$($1_$2_DUMP_EXTRA_ARG) $$($1_$2_CDS_DUMP_FLAGS) $$(LOG_INFO), \
+           -XX:SharedArchiveFile=$$(JDK_IMAGE_DIR)/$$($1_$2_$3_CDS_ARCHIVE) \
+           -$1 $$($1_$2_$3_DUMP_EXTRA_ARG) $$($1_$2_$3_CDS_DUMP_FLAGS) $$(LOG_INFO), \
    ))
  
-   JDK_TARGETS += $$($1_$2_gen_cds_archive_jdk)
+   JDK_TARGETS += $$($1_$2_$3_gen_cds_archive_jdk)
  
-   $$(eval $$(call SetupExecute, $1_$2_gen_cds_archive_jre, \
-       WARN := Creating CDS$$($1_$2_DUMP_TYPE) archive for jre image for $1, \
-       INFO := Using CDS flags for $1: $$($1_$2_CDS_DUMP_FLAGS), \
+   $$(eval $$(call SetupExecute, $1_$2_$3_gen_cds_archive_jre, \
+       WARN := Creating CDS$$($1_$2_$3_DUMP_TYPE) archive for jre image for $1, \
+       INFO := Using CDS flags for $1: $$($1_$2_$3_CDS_DUMP_FLAGS), \
        DEPS := $$(jlink_jre), \
-       OUTPUT_FILE := $$(JRE_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE), \
+       OUTPUT_FILE := $$(JRE_IMAGE_DIR)/$$($1_$2_$3_CDS_ARCHIVE), \
        SUPPORT_DIR := $$(JRE_IMAGE_SUPPORT_DIR), \
        COMMAND := $$(FIXPATH) $$(JRE_IMAGE_DIR)/bin/java -Xshare:dump \
-           -XX:SharedArchiveFile=$$(JRE_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE) \
-           -$1 $$($1_$2_DUMP_EXTRA_ARG) $$($1_$2_CDS_DUMP_FLAGS) $$(LOG_INFO), \
+           -XX:SharedArchiveFile=$$(JRE_IMAGE_DIR)/$$($1_$2_$3_CDS_ARCHIVE) \
+           -$1 $$($1_$2_$3_DUMP_EXTRA_ARG) $$($1_$2_$3_CDS_DUMP_FLAGS) $$(LOG_INFO), \
    ))
  
-   JRE_TARGETS += $$($1_$2_gen_cds_archive_jre)
+   JRE_TARGETS += $$($1_$2_$3_gen_cds_archive_jre)
  endef
  
  ifeq ($(BUILD_CDS_ARCHIVE), true)
    $(foreach v, $(JVM_VARIANTS), \
-     $(eval $(call CreateCDSArchive,$v,)) \
+     $(eval $(call CreateCDSArchive,$v,,)) \
+     $(eval $(call CreateCDSArchive,$v,,_valhalla)) \
    )
  
    ifeq ($(call isTargetCpuBits, 64), true)
      $(foreach v, $(JVM_VARIANTS), \
-       $(eval $(call CreateCDSArchive,$v,_nocoops)) \
+       $(eval $(call CreateCDSArchive,$v,_nocoops,)) \
+       $(eval $(call CreateCDSArchive,$v,_nocoops,_valhalla)) \
      )
    endif
  endif
  
  ################################################################################
< prev index next >