8155786: Determine modules depending on upgradeable modules directly and indirectly
Reviewed-by: alanb, mchung
This commit is contained in:
parent
a2ce513fbd
commit
23043ca1e6
@ -69,21 +69,13 @@ endif
|
|||||||
# Add dependencies on other jmod files. Only java.base needs access to other
|
# Add dependencies on other jmod files. Only java.base needs access to other
|
||||||
# jmods.
|
# jmods.
|
||||||
ifeq ($(MODULE), java.base)
|
ifeq ($(MODULE), java.base)
|
||||||
|
ALL_UPGRADEABLE_MODULES = $(call FindAllUpgradeableModules)
|
||||||
# When creating a BUILDJDK, we don't need to add hashes to java.base
|
# When creating a BUILDJDK, we don't need to add hashes to java.base
|
||||||
ifneq ($(CREATING_BUILDJDK), true)
|
ifneq ($(CREATING_BUILDJDK), true)
|
||||||
DEPS += $(patsubst %, $(JMODS_DIR)/%.jmod, \
|
DEPS += $(patsubst %, $(JMODS_DIR)/%.jmod, \
|
||||||
$(filter-out java.base, $(call FindAllModules)))
|
$(filter-out java.base $(ALL_UPGRADEABLE_MODULES), $(call FindAllModules)))
|
||||||
|
|
||||||
# TODO: find modules that directly and indirectly depend on upgradeable
|
EXCLUDE_PATTERN := $(strip $(subst $(SPACE),|,$(strip $(ALL_UPGRADEABLE_MODULES))))
|
||||||
# modules
|
|
||||||
EXCLUDE_HASH_MODULES := $(UPGRADEABLE_MODULES) \
|
|
||||||
java.se.ee \
|
|
||||||
jdk.rmic \
|
|
||||||
jdk.xml.bind \
|
|
||||||
jdk.xml.ws \
|
|
||||||
#
|
|
||||||
|
|
||||||
EXCLUDE_PATTERN := $(strip $(subst $(SPACE),|,$(strip $(EXCLUDE_HASH_MODULES))))
|
|
||||||
|
|
||||||
JMOD_FLAGS += --modulepath $(JMODS_DIR) \
|
JMOD_FLAGS += --modulepath $(JMODS_DIR) \
|
||||||
--hash-modules '^(?!$(EXCLUDE_PATTERN))'
|
--hash-modules '^(?!$(EXCLUDE_PATTERN))'
|
||||||
|
@ -596,7 +596,8 @@ else
|
|||||||
# When creating a BUILDJDK, we don't need to add hashes to java.base, thus
|
# When creating a BUILDJDK, we don't need to add hashes to java.base, thus
|
||||||
# we don't need to depend on all other jmods
|
# we don't need to depend on all other jmods
|
||||||
ifneq ($(CREATING_BUILDJDK), true)
|
ifneq ($(CREATING_BUILDJDK), true)
|
||||||
java.base-jmod: $(filter-out java.base-jmod, $(JMOD_TARGETS))
|
java.base-jmod: $(filter-out java.base-jmod \
|
||||||
|
$(addsuffix -jmod, $(call FindAllUpgradeableModules)), $(JMOD_TARGETS))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Declare dependencies from <module>-jmod to all other module targets
|
# Declare dependencies from <module>-jmod to all other module targets
|
||||||
|
@ -86,6 +86,10 @@ UPGRADEABLE_MODULES += \
|
|||||||
java.xml.ws \
|
java.xml.ws \
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Modules explicitly declared as not being upgradeable even though they require
|
||||||
|
# an upgradeable module.
|
||||||
|
NON_UPGRADEABLE_MODULES +=
|
||||||
|
|
||||||
AGGREGATOR_MODULES += \
|
AGGREGATOR_MODULES += \
|
||||||
java.compact1 \
|
java.compact1 \
|
||||||
java.compact2 \
|
java.compact2 \
|
||||||
@ -245,6 +249,19 @@ FindTransitiveDepsForModule = \
|
|||||||
$(foreach n, $(call FindDepsForModule, $m), \
|
$(foreach n, $(call FindDepsForModule, $m), \
|
||||||
$(call FindDepsForModule, $n))))
|
$(call FindDepsForModule, $n))))
|
||||||
|
|
||||||
|
# Upgradeable modules are those that are either defined as upgradeable or that
|
||||||
|
# require an upradeable module.
|
||||||
|
FindAllUpgradeableModules = \
|
||||||
|
$(filter-out $(MODULES_FILTER) $(NON_UPGRADEABLE_MODULES), \
|
||||||
|
$(sort $(UPGRADEABLE_MODULES) $(foreach m, \
|
||||||
|
$(filter-out $(UPGRADEABLE_MODULES), $(call FindAllModules)), \
|
||||||
|
$(if $(filter $(UPGRADEABLE_MODULES), \
|
||||||
|
$(call FindTransitiveDepsForModule, $m)), \
|
||||||
|
$m \
|
||||||
|
) \
|
||||||
|
)) \
|
||||||
|
)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# Param 1 - Name of module
|
# Param 1 - Name of module
|
||||||
|
Loading…
Reference in New Issue
Block a user