Skip to content

Commit d2eed07

Browse files
committed
8293020: jmod should not be treated as "small" tool for large modules
Reviewed-by: erikj, ihse, alanb
1 parent 923c952 commit d2eed07

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

make/CreateJmods.gmk

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,12 @@ else
226226
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
227227
endif
228228

229+
# Unless we are creating a very large module, use the small tool JVM options
230+
JMOD_SMALL_FLAGS :=
231+
ifeq ($(findstring $(MODULE), java.base java.desktop jdk.localedata), )
232+
JMOD_SMALL_FLAGS += $(JAVA_TOOL_FLAGS_SMALL)
233+
endif
234+
229235
# Create jmods in the support dir and then move them into place to keep the
230236
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
231237
$(eval $(call SetupExecute, create_$(JMOD_FILE), \
@@ -234,7 +240,7 @@ $(eval $(call SetupExecute, create_$(JMOD_FILE), \
234240
OUTPUT_FILE := $(JMODS_DIR)/$(JMOD_FILE), \
235241
SUPPORT_DIR := $(JMODS_SUPPORT_DIR), \
236242
PRE_COMMAND := $(RM) $(JMODS_DIR)/$(JMOD_FILE) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
237-
COMMAND := $(JMOD) create --module-version $(VERSION_SHORT) \
243+
COMMAND := $(JMOD) $(JMOD_SMALL_FLAGS) create --module-version $(VERSION_SHORT) \
238244
--target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \
239245
--module-path $(JMODS_DIR) $(JMOD_FLAGS) \
240246
--date $(SOURCE_DATE_ISO_8601) \

make/autoconf/spec.gmk.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ JAVAC = $(JAVAC_CMD)
664664
JAVADOC = $(JAVADOC_CMD)
665665
JAR = $(JAR_CMD)
666666
JLINK = $(JLINK_CMD)
667-
JMOD = $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
667+
JMOD = $(JMOD_CMD)
668668

669669
BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
670670
BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)

0 commit comments

Comments
 (0)