8258411: Move module set configuration from Modules.gmk to conf dir

Reviewed-by: alanb, mchung
This commit is contained in:
Magnus Ihse Bursie 2020-12-16 21:57:32 +00:00
parent aa9c136d67
commit a244b82293
5 changed files with 238 additions and 172 deletions

View File

@ -44,7 +44,7 @@ ALL_MODULES := $(call FindAllModules)
$(eval $(call ReadImportMetaData))
JRE_MODULES += $(filter $(ALL_MODULES), $(BOOT_MODULES) \
$(PLATFORM_MODULES) $(JRE_TOOL_MODULES))
$(PLATFORM_MODULES) jdk.jdwp.agent)
JDK_MODULES += $(ALL_MODULES)
JRE_MODULES_LIST := $(call CommaList, $(JRE_MODULES))

View File

@ -26,206 +26,54 @@
ifndef _MODULES_GMK
_MODULES_GMK := 1
################################################################################
#
# BOOT_MODULES are modules defined by the boot loader
# PLATFORM_MODULES are modules defined by the platform loader
# JRE_TOOL_MODULES are tools included in JRE and defined by the application loader
#
# All other modules not declared below are defined by the application loader
# and are not included in JRE.
BOOT_MODULES :=
PLATFORM_MODULES :=
JRE_TOOL_MODULES :=
UPGRADEABLE_MODULES :=
AGGREGATOR_MODULES :=
DOCS_MODULES :=
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, common/Modules.gmk))
BOOT_MODULES += \
java.base \
java.datatransfer \
java.desktop \
java.instrument \
java.logging \
java.management \
java.management.rmi \
java.naming \
java.prefs \
java.rmi \
java.security.sasl \
java.xml \
jdk.incubator.foreign \
jdk.incubator.vector \
jdk.internal.vm.ci \
jdk.jfr \
jdk.management \
jdk.management.jfr \
jdk.management.agent \
jdk.net \
jdk.nio.mapmode \
jdk.sctp \
jdk.unsupported \
#
################################################################################
# Setup module sets for classloaders
# to be deprivileged
BOOT_MODULES += \
jdk.naming.rmi \
#
include $(TOPDIR)/make/conf/module-loader-map.conf
# Modules that directly or indirectly requiring upgradeable modules
# should carefully be considered if it should be upgradeable or not.
UPGRADEABLE_MODULES += \
java.compiler \
jdk.aot \
jdk.internal.vm.compiler \
jdk.internal.vm.compiler.management \
#
AGGREGATOR_MODULES += \
java.se \
#
PLATFORM_MODULES += \
$(UPGRADEABLE_MODULES) \
$(AGGREGATOR_MODULES)
#
PLATFORM_MODULES += \
java.net.http \
java.scripting \
java.security.jgss \
java.smartcardio \
java.sql \
java.sql.rowset \
java.transaction.xa \
java.xml.crypto \
jdk.accessibility \
jdk.charsets \
jdk.crypto.cryptoki \
jdk.crypto.ec \
jdk.dynalink \
jdk.httpserver \
jdk.jsobject \
jdk.localedata \
jdk.naming.dns \
jdk.security.auth \
jdk.security.jgss \
jdk.xml.dom \
jdk.zipfs \
#
ifeq ($(call isTargetOs, windows), true)
PLATFORM_MODULES += jdk.crypto.mscapi
endif
JRE_TOOL_MODULES += \
jdk.jdwp.agent \
#
# Append platform-specific and upgradeable modules
PLATFORM_MODULES += $(PLATFORM_MODULES_$(OPENJDK_TARGET_OS)) \
$(UPGRADEABLE_PLATFORM_MODULES)
################################################################################
# Setup module sets for docs
# DOCS_MODULES defines the root modules for javadoc generation.
# All of their `require transitive` modules directly and indirectly will be included.
DOCS_MODULES += \
java.se \
java.smartcardio \
jdk.accessibility \
jdk.attach \
jdk.charsets \
jdk.compiler \
jdk.crypto.cryptoki \
jdk.crypto.ec \
jdk.dynalink \
jdk.editpad \
jdk.hotspot.agent \
jdk.httpserver \
jdk.jpackage \
jdk.incubator.vector \
jdk.jartool \
jdk.javadoc \
jdk.jcmd \
jdk.jconsole \
jdk.jdeps \
jdk.jdi \
jdk.jdwp.agent \
jdk.jfr \
jdk.jlink \
jdk.jsobject \
jdk.jshell \
jdk.jstatd \
jdk.incubator.foreign \
jdk.localedata \
jdk.management \
jdk.management.agent \
jdk.management.jfr \
jdk.naming.dns \
jdk.naming.rmi \
jdk.net \
jdk.nio.mapmode \
jdk.sctp \
jdk.security.auth \
jdk.security.jgss \
jdk.xml.dom \
jdk.zipfs \
#
# These modules are included in the interim image which is used to run profiling
# before building the real images.
INTERIM_IMAGE_MODULES := java.base java.logging
LANGTOOLS_MODULES := \
java.compiler \
jdk.compiler \
jdk.javadoc \
jdk.jdeps \
jdk.jshell \
#
HOTSPOT_MODULES := \
jdk.aot \
jdk.hotspot.agent \
jdk.internal.vm.ci \
jdk.internal.vm.compiler \
jdk.internal.vm.compiler.management \
#
include $(TOPDIR)/make/conf/docs-modules.conf
################################################################################
# Setup module sets needed by the build system
include $(TOPDIR)/make/conf/build-module-sets.conf
################################################################################
# Depending on the configuration, we might need to filter out some modules that
# normally should have been included
# Some platforms don't have the serviceability agent
ifeq ($(INCLUDE_SA), false)
MODULES_FILTER += jdk.hotspot.agent
endif
################################################################################
# Filter out jvmci specific modules if jvmci is disabled
ifeq ($(INCLUDE_JVMCI), false)
MODULES_FILTER += jdk.internal.vm.ci
endif
################################################################################
# Filter out Graal specific modules if Graal is disabled
ifeq ($(INCLUDE_GRAAL), false)
MODULES_FILTER += jdk.internal.vm.compiler
MODULES_FILTER += jdk.internal.vm.compiler.management
endif
################################################################################
# Filter out aot specific modules if aot is disabled
ifeq ($(ENABLE_AOT), false)
MODULES_FILTER += jdk.aot
endif
################################################################################
# jpackage is only on windows, macosx, and linux
ifeq ($(call isTargetOs, windows macosx linux), false)
MODULES_FILTER += jdk.jpackage
endif
@ -409,8 +257,7 @@ FindTransitiveIndirectDepsForModules = \
# Upgradeable modules are those that are either defined as upgradeable or that
# require an upradeable module.
FindAllUpgradeableModules = \
$(sort $(filter-out $(MODULES_FILTER), $(UPGRADEABLE_MODULES)))
$(sort $(filter-out $(MODULES_FILTER), $(UPGRADEABLE_PLATFORM_MODULES)))
################################################################################
@ -466,7 +313,6 @@ endef
# * JDK_MODULES
# * BOOT_MODULES
# * PLATFORM_MODULES
# * JRE_TOOL_MODULES
define ReadImportMetaData
IMPORTED_MODULES := $$(call FindImportedModules)
$$(foreach m, $$(IMPORTED_MODULES), \

View File

@ -0,0 +1,52 @@
#
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
################################################################################
# Module sets needed by the build system
# These modules are included in the interim image which is used to run profiling
# before building the real images.
INTERIM_IMAGE_MODULES= \
java.base \
java.logging \
#
# These targets require buildtools-langtools to process for gensrc
LANGTOOLS_MODULES= \
java.compiler \
jdk.compiler \
jdk.javadoc \
jdk.jdeps \
jdk.jshell \
#
# These models require buildtools-hotspot to process for gensrc
HOTSPOT_MODULES= \
jdk.aot \
jdk.hotspot.agent \
jdk.internal.vm.ci \
jdk.internal.vm.compiler \
jdk.internal.vm.compiler.management \
#

View File

@ -0,0 +1,72 @@
#
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
################################################################################
# Module sets needed to build docs.
#
# DOCS_MODULES defines the root modules for javadoc generation.
# All of their `require transitive` modules directly and indirectly will be included.
DOCS_MODULES= \
java.se \
java.smartcardio \
jdk.accessibility \
jdk.attach \
jdk.charsets \
jdk.compiler \
jdk.crypto.cryptoki \
jdk.crypto.ec \
jdk.dynalink \
jdk.editpad \
jdk.hotspot.agent \
jdk.httpserver \
jdk.jpackage \
jdk.incubator.vector \
jdk.jartool \
jdk.javadoc \
jdk.jcmd \
jdk.jconsole \
jdk.jdeps \
jdk.jdi \
jdk.jdwp.agent \
jdk.jfr \
jdk.jlink \
jdk.jsobject \
jdk.jshell \
jdk.jstatd \
jdk.incubator.foreign \
jdk.localedata \
jdk.management \
jdk.management.agent \
jdk.management.jfr \
jdk.naming.dns \
jdk.naming.rmi \
jdk.net \
jdk.nio.mapmode \
jdk.sctp \
jdk.security.auth \
jdk.security.jgss \
jdk.xml.dom \
jdk.zipfs \
#

View File

@ -0,0 +1,96 @@
#
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
################################################################################
# BOOT_MODULES are modules defined by the boot loader
# PLATFORM_MODULES are modules defined by the platform loader
#
# All other modules not declared below are defined by the application loader
# and are not included in JRE.
BOOT_MODULES= \
java.base \
java.datatransfer \
java.desktop \
java.instrument \
java.logging \
java.management \
java.management.rmi \
java.naming \
java.prefs \
java.rmi \
java.security.sasl \
java.xml \
jdk.incubator.foreign \
jdk.incubator.vector \
jdk.internal.vm.ci \
jdk.jfr \
jdk.management \
jdk.management.jfr \
jdk.management.agent \
jdk.net \
jdk.nio.mapmode \
jdk.sctp \
jdk.unsupported \
jdk.naming.rmi \
#
# Modules that directly or indirectly requiring upgradeable modules
# should carefully be considered if it should be upgradeable or not.
UPGRADEABLE_PLATFORM_MODULES= \
java.compiler \
jdk.aot \
jdk.internal.vm.compiler \
jdk.internal.vm.compiler.management \
#
PLATFORM_MODULES= \
java.se \
java.net.http \
java.scripting \
java.security.jgss \
java.smartcardio \
java.sql \
java.sql.rowset \
java.transaction.xa \
java.xml.crypto \
jdk.accessibility \
jdk.charsets \
jdk.crypto.cryptoki \
jdk.crypto.ec \
jdk.dynalink \
jdk.httpserver \
jdk.jsobject \
jdk.localedata \
jdk.naming.dns \
jdk.security.auth \
jdk.security.jgss \
jdk.xml.dom \
jdk.zipfs \
#
PLATFORM_MODULES_windows= \
jdk.crypto.mscapi \
#