Skip to content
This repository has been archived by the owner on Oct 22, 2020. It is now read-only.

Commit

Permalink
Add j9ddr.dat as a target in order to run ddrgen
Browse files Browse the repository at this point in the history
Since we moved ddrgen outside of the VM, we also don't want to run it
if it doesn't need to in an incremental build. Thus we have j9ddr.dat
as a target so that ddrgen is only run if the file does not exist or
needs to be updated.

Signed-off-by: mikezhang <[email protected]>
  • Loading branch information
mikezhang1234567890 committed Aug 15, 2018
1 parent e6e70c6 commit cbe7634
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions closed/OpenJ9.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,22 @@ OPENJ9_MISC_FILES := \
OPENJ9_NOTICE_FILES := openj9-notices.html
OPENJ9_REDIRECTOR := redirector/$(LIBRARY_PREFIX)jvm_b156$(SHARED_LIBRARY_SUFFIX)

OPENJ9_DDR_FILES :=

ifeq (true,$(OPENJ9_ENABLE_DDR))
.PHONY : run-ddrgen
$(OUTPUT_ROOT)/vm/j9ddr.dat : run-ddrgen
run-ddrgen :
export OPENJDK_VERSION_NUMBER_FOUR_POSITIONS=$(VERSION_NUMBER_FOUR_POSITIONS) \
VERSION_MAJOR=9 \
$(EXPORT_MSVS_ENV_VARS) \
&& $(MAKE) -C $(OUTPUTDIR)/vm/ddr -f run_omrddrgen.mk \
CC="$(CC)" \
CXX="$(CXX)"

OPENJ9_DDR_FILES += j9ddr.dat
endif

MODULES_LIBS_DIR := $(OUTPUT_ROOT)/support/modules_libs

# openjdk makeflags don't work with openj9/omr native compiles; override with number of CPUs which openj9 and omr need supplied
Expand Down Expand Up @@ -178,6 +194,9 @@ $(foreach file,$(OPENJ9_SHARED_CLASSES_LIBRARIES), \
$(foreach file,$(OPENJ9_MANAGEMENT_LIBRARIES), \
$(eval $(call openj9_copy_prereq,$1,$(MODULES_LIBS_DIR)/java.management/$(OPENJ9_LIBS_SUBDIR)/$(file),$(OUTPUT_ROOT)/vm/$(file))))

$(foreach file,$(OPENJ9_DDR_FILES), \
$(eval $(call openj9_copy_prereq,$1,$(MODULES_LIBS_DIR)/java.base/$(OPENJ9_LIBS_SUBDIR)/$(file),$(OUTPUT_ROOT)/vm/$(file))))

endef

# generated_target_rules
Expand Down Expand Up @@ -418,14 +437,6 @@ endif
@$(MKDIR) -p $(MODULES_LIBS_DIR)/java.base/server
@$(CP) -p $(OUTPUT_ROOT)/vm/redirector/$(LIBRARY_PREFIX)jvm_b156$(SHARED_LIBRARY_SUFFIX) $(MODULES_LIBS_DIR)/java.base/server/$(LIBRARY_PREFIX)jvm$(SHARED_LIBRARY_SUFFIX)

ifeq (true,$(OPENJ9_ENABLE_DDR))
@$(ECHO) Running ddrgen to create j9ddr.dat, then copying it to lib directory
$(MAKE) -C $(OUTPUT_ROOT)/vm/ddr -f run_omrddrgen.mk VERSION_MAJOR=9 OPENJDK_VERSION_NUMBER_FOUR_POSITIONS=$(VERSION_NUMBER_FOUR_POSITIONS) \
CC="$(CC)" CXX="$(CXX)" $(EXPORT_MSVS_ENV_VARS)
@$(MKDIR) -p $(MODULES_LIBS_DIR)/java.base/$(OPENJ9_LIBS_SUBDIR)
@$(CP) -p $(OUTPUT_ROOT)/vm/j9ddr.dat $(MODULES_LIBS_DIR)/java.base/$(OPENJ9_LIBS_SUBDIR)/
endif

J9JCL_SOURCES_DONEFILE := $(MAKESUPPORT_OUTPUTDIR)/j9jcl_sources.done

recur_wildcard = $(foreach dir,$(wildcard $1/*),$(call recur_wildcard,$(dir),$2) $(filter $(subst *,%,$2),$(dir)))
Expand Down

0 comments on commit cbe7634

Please sign in to comment.