Skip to content

Commit

Permalink
8293020: jmod should not be treated as "small" tool for large modules
Browse files Browse the repository at this point in the history
Reviewed-by: erikj, ihse, alanb
  • Loading branch information
shipilev committed Aug 31, 2022
1 parent 923c952 commit d2eed07
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion make/CreateJmods.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,12 @@ else
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
endif

# Unless we are creating a very large module, use the small tool JVM options
JMOD_SMALL_FLAGS :=
ifeq ($(findstring $(MODULE), java.base java.desktop jdk.localedata), )
JMOD_SMALL_FLAGS += $(JAVA_TOOL_FLAGS_SMALL)
endif

# Create jmods in the support dir and then move them into place to keep the
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
$(eval $(call SetupExecute, create_$(JMOD_FILE), \
Expand All @@ -234,7 +240,7 @@ $(eval $(call SetupExecute, create_$(JMOD_FILE), \
OUTPUT_FILE := $(JMODS_DIR)/$(JMOD_FILE), \
SUPPORT_DIR := $(JMODS_SUPPORT_DIR), \
PRE_COMMAND := $(RM) $(JMODS_DIR)/$(JMOD_FILE) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
COMMAND := $(JMOD) create --module-version $(VERSION_SHORT) \
COMMAND := $(JMOD) $(JMOD_SMALL_FLAGS) create --module-version $(VERSION_SHORT) \
--target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \
--module-path $(JMODS_DIR) $(JMOD_FLAGS) \
--date $(SOURCE_DATE_ISO_8601) \
Expand Down
2 changes: 1 addition & 1 deletion make/autoconf/spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ JAVAC = $(JAVAC_CMD)
JAVADOC = $(JAVADOC_CMD)
JAR = $(JAR_CMD)
JLINK = $(JLINK_CMD)
JMOD = $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
JMOD = $(JMOD_CMD)

BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
Expand Down

1 comment on commit d2eed07

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.