Skip to content

Commit a244b82

Browse files
committed
8258411: Move module set configuration from Modules.gmk to conf dir
Reviewed-by: alanb, mchung
1 parent aa9c136 commit a244b82

File tree

5 files changed

+236
-170
lines changed

5 files changed

+236
-170
lines changed

make/Images.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ ALL_MODULES := $(call FindAllModules)
4444
$(eval $(call ReadImportMetaData))
4545

4646
JRE_MODULES += $(filter $(ALL_MODULES), $(BOOT_MODULES) \
47-
$(PLATFORM_MODULES) $(JRE_TOOL_MODULES))
47+
$(PLATFORM_MODULES) jdk.jdwp.agent)
4848
JDK_MODULES += $(ALL_MODULES)
4949

5050
JRE_MODULES_LIST := $(call CommaList, $(JRE_MODULES))

make/common/Modules.gmk

Lines changed: 15 additions & 169 deletions
Original file line numberDiff line numberDiff line change
@@ -26,206 +26,54 @@
2626
ifndef _MODULES_GMK
2727
_MODULES_GMK := 1
2828

29-
################################################################################
30-
#
31-
# BOOT_MODULES are modules defined by the boot loader
32-
# PLATFORM_MODULES are modules defined by the platform loader
33-
# JRE_TOOL_MODULES are tools included in JRE and defined by the application loader
34-
#
35-
# All other modules not declared below are defined by the application loader
36-
# and are not included in JRE.
37-
38-
BOOT_MODULES :=
39-
PLATFORM_MODULES :=
40-
JRE_TOOL_MODULES :=
41-
UPGRADEABLE_MODULES :=
42-
AGGREGATOR_MODULES :=
43-
DOCS_MODULES :=
44-
4529
# Hook to include the corresponding custom file, if present.
4630
$(eval $(call IncludeCustomExtension, common/Modules.gmk))
4731

48-
BOOT_MODULES += \
49-
java.base \
50-
java.datatransfer \
51-
java.desktop \
52-
java.instrument \
53-
java.logging \
54-
java.management \
55-
java.management.rmi \
56-
java.naming \
57-
java.prefs \
58-
java.rmi \
59-
java.security.sasl \
60-
java.xml \
61-
jdk.incubator.foreign \
62-
jdk.incubator.vector \
63-
jdk.internal.vm.ci \
64-
jdk.jfr \
65-
jdk.management \
66-
jdk.management.jfr \
67-
jdk.management.agent \
68-
jdk.net \
69-
jdk.nio.mapmode \
70-
jdk.sctp \
71-
jdk.unsupported \
72-
#
73-
74-
# to be deprivileged
75-
BOOT_MODULES += \
76-
jdk.naming.rmi \
77-
#
78-
79-
# Modules that directly or indirectly requiring upgradeable modules
80-
# should carefully be considered if it should be upgradeable or not.
81-
UPGRADEABLE_MODULES += \
82-
java.compiler \
83-
jdk.aot \
84-
jdk.internal.vm.compiler \
85-
jdk.internal.vm.compiler.management \
86-
#
87-
88-
89-
AGGREGATOR_MODULES += \
90-
java.se \
91-
#
92-
93-
PLATFORM_MODULES += \
94-
$(UPGRADEABLE_MODULES) \
95-
$(AGGREGATOR_MODULES)
96-
#
97-
98-
PLATFORM_MODULES += \
99-
java.net.http \
100-
java.scripting \
101-
java.security.jgss \
102-
java.smartcardio \
103-
java.sql \
104-
java.sql.rowset \
105-
java.transaction.xa \
106-
java.xml.crypto \
107-
jdk.accessibility \
108-
jdk.charsets \
109-
jdk.crypto.cryptoki \
110-
jdk.crypto.ec \
111-
jdk.dynalink \
112-
jdk.httpserver \
113-
jdk.jsobject \
114-
jdk.localedata \
115-
jdk.naming.dns \
116-
jdk.security.auth \
117-
jdk.security.jgss \
118-
jdk.xml.dom \
119-
jdk.zipfs \
120-
#
32+
################################################################################
33+
# Setup module sets for classloaders
12134

122-
ifeq ($(call isTargetOs, windows), true)
123-
PLATFORM_MODULES += jdk.crypto.mscapi
124-
endif
35+
include $(TOPDIR)/make/conf/module-loader-map.conf
12536

126-
JRE_TOOL_MODULES += \
127-
jdk.jdwp.agent \
128-
#
37+
# Append platform-specific and upgradeable modules
38+
PLATFORM_MODULES += $(PLATFORM_MODULES_$(OPENJDK_TARGET_OS)) \
39+
$(UPGRADEABLE_PLATFORM_MODULES)
12940

13041
################################################################################
42+
# Setup module sets for docs
13143

132-
# DOCS_MODULES defines the root modules for javadoc generation.
133-
# All of their `require transitive` modules directly and indirectly will be included.
134-
DOCS_MODULES += \
135-
java.se \
136-
java.smartcardio \
137-
jdk.accessibility \
138-
jdk.attach \
139-
jdk.charsets \
140-
jdk.compiler \
141-
jdk.crypto.cryptoki \
142-
jdk.crypto.ec \
143-
jdk.dynalink \
144-
jdk.editpad \
145-
jdk.hotspot.agent \
146-
jdk.httpserver \
147-
jdk.jpackage \
148-
jdk.incubator.vector \
149-
jdk.jartool \
150-
jdk.javadoc \
151-
jdk.jcmd \
152-
jdk.jconsole \
153-
jdk.jdeps \
154-
jdk.jdi \
155-
jdk.jdwp.agent \
156-
jdk.jfr \
157-
jdk.jlink \
158-
jdk.jsobject \
159-
jdk.jshell \
160-
jdk.jstatd \
161-
jdk.incubator.foreign \
162-
jdk.localedata \
163-
jdk.management \
164-
jdk.management.agent \
165-
jdk.management.jfr \
166-
jdk.naming.dns \
167-
jdk.naming.rmi \
168-
jdk.net \
169-
jdk.nio.mapmode \
170-
jdk.sctp \
171-
jdk.security.auth \
172-
jdk.security.jgss \
173-
jdk.xml.dom \
174-
jdk.zipfs \
175-
#
44+
include $(TOPDIR)/make/conf/docs-modules.conf
17645

177-
# These modules are included in the interim image which is used to run profiling
178-
# before building the real images.
179-
INTERIM_IMAGE_MODULES := java.base java.logging
180-
181-
LANGTOOLS_MODULES := \
182-
java.compiler \
183-
jdk.compiler \
184-
jdk.javadoc \
185-
jdk.jdeps \
186-
jdk.jshell \
187-
#
46+
################################################################################
47+
# Setup module sets needed by the build system
18848

189-
HOTSPOT_MODULES := \
190-
jdk.aot \
191-
jdk.hotspot.agent \
192-
jdk.internal.vm.ci \
193-
jdk.internal.vm.compiler \
194-
jdk.internal.vm.compiler.management \
195-
#
49+
include $(TOPDIR)/make/conf/build-module-sets.conf
19650

19751
################################################################################
198-
# Some platforms don't have the serviceability agent
52+
# Depending on the configuration, we might need to filter out some modules that
53+
# normally should have been included
19954

55+
# Some platforms don't have the serviceability agent
20056
ifeq ($(INCLUDE_SA), false)
20157
MODULES_FILTER += jdk.hotspot.agent
20258
endif
20359

204-
################################################################################
20560
# Filter out jvmci specific modules if jvmci is disabled
206-
20761
ifeq ($(INCLUDE_JVMCI), false)
20862
MODULES_FILTER += jdk.internal.vm.ci
20963
endif
21064

211-
################################################################################
21265
# Filter out Graal specific modules if Graal is disabled
213-
21466
ifeq ($(INCLUDE_GRAAL), false)
21567
MODULES_FILTER += jdk.internal.vm.compiler
21668
MODULES_FILTER += jdk.internal.vm.compiler.management
21769
endif
21870

219-
################################################################################
22071
# Filter out aot specific modules if aot is disabled
221-
22272
ifeq ($(ENABLE_AOT), false)
22373
MODULES_FILTER += jdk.aot
22474
endif
22575

226-
################################################################################
22776
# jpackage is only on windows, macosx, and linux
228-
22977
ifeq ($(call isTargetOs, windows macosx linux), false)
23078
MODULES_FILTER += jdk.jpackage
23179
endif
@@ -409,8 +257,7 @@ FindTransitiveIndirectDepsForModules = \
409257
# Upgradeable modules are those that are either defined as upgradeable or that
410258
# require an upradeable module.
411259
FindAllUpgradeableModules = \
412-
$(sort $(filter-out $(MODULES_FILTER), $(UPGRADEABLE_MODULES)))
413-
260+
$(sort $(filter-out $(MODULES_FILTER), $(UPGRADEABLE_PLATFORM_MODULES)))
414261

415262
################################################################################
416263

@@ -466,7 +313,6 @@ endef
466313
# * JDK_MODULES
467314
# * BOOT_MODULES
468315
# * PLATFORM_MODULES
469-
# * JRE_TOOL_MODULES
470316
define ReadImportMetaData
471317
IMPORTED_MODULES := $$(call FindImportedModules)
472318
$$(foreach m, $$(IMPORTED_MODULES), \

make/conf/build-module-sets.conf

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#
2+
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
3+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
#
5+
# This code is free software; you can redistribute it and/or modify it
6+
# under the terms of the GNU General Public License version 2 only, as
7+
# published by the Free Software Foundation. Oracle designates this
8+
# particular file as subject to the "Classpath" exception as provided
9+
# by Oracle in the LICENSE file that accompanied this code.
10+
#
11+
# This code is distributed in the hope that it will be useful, but WITHOUT
12+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
# version 2 for more details (a copy is included in the LICENSE file that
15+
# accompanied this code).
16+
#
17+
# You should have received a copy of the GNU General Public License version
18+
# 2 along with this work; if not, write to the Free Software Foundation,
19+
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20+
#
21+
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22+
# or visit www.oracle.com if you need additional information or have any
23+
# questions.
24+
#
25+
26+
################################################################################
27+
# Module sets needed by the build system
28+
29+
# These modules are included in the interim image which is used to run profiling
30+
# before building the real images.
31+
INTERIM_IMAGE_MODULES= \
32+
java.base \
33+
java.logging \
34+
#
35+
36+
# These targets require buildtools-langtools to process for gensrc
37+
LANGTOOLS_MODULES= \
38+
java.compiler \
39+
jdk.compiler \
40+
jdk.javadoc \
41+
jdk.jdeps \
42+
jdk.jshell \
43+
#
44+
45+
# These models require buildtools-hotspot to process for gensrc
46+
HOTSPOT_MODULES= \
47+
jdk.aot \
48+
jdk.hotspot.agent \
49+
jdk.internal.vm.ci \
50+
jdk.internal.vm.compiler \
51+
jdk.internal.vm.compiler.management \
52+
#

make/conf/docs-modules.conf

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#
2+
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
3+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
#
5+
# This code is free software; you can redistribute it and/or modify it
6+
# under the terms of the GNU General Public License version 2 only, as
7+
# published by the Free Software Foundation. Oracle designates this
8+
# particular file as subject to the "Classpath" exception as provided
9+
# by Oracle in the LICENSE file that accompanied this code.
10+
#
11+
# This code is distributed in the hope that it will be useful, but WITHOUT
12+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
# version 2 for more details (a copy is included in the LICENSE file that
15+
# accompanied this code).
16+
#
17+
# You should have received a copy of the GNU General Public License version
18+
# 2 along with this work; if not, write to the Free Software Foundation,
19+
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20+
#
21+
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22+
# or visit www.oracle.com if you need additional information or have any
23+
# questions.
24+
#
25+
26+
################################################################################
27+
# Module sets needed to build docs.
28+
#
29+
# DOCS_MODULES defines the root modules for javadoc generation.
30+
# All of their `require transitive` modules directly and indirectly will be included.
31+
DOCS_MODULES= \
32+
java.se \
33+
java.smartcardio \
34+
jdk.accessibility \
35+
jdk.attach \
36+
jdk.charsets \
37+
jdk.compiler \
38+
jdk.crypto.cryptoki \
39+
jdk.crypto.ec \
40+
jdk.dynalink \
41+
jdk.editpad \
42+
jdk.hotspot.agent \
43+
jdk.httpserver \
44+
jdk.jpackage \
45+
jdk.incubator.vector \
46+
jdk.jartool \
47+
jdk.javadoc \
48+
jdk.jcmd \
49+
jdk.jconsole \
50+
jdk.jdeps \
51+
jdk.jdi \
52+
jdk.jdwp.agent \
53+
jdk.jfr \
54+
jdk.jlink \
55+
jdk.jsobject \
56+
jdk.jshell \
57+
jdk.jstatd \
58+
jdk.incubator.foreign \
59+
jdk.localedata \
60+
jdk.management \
61+
jdk.management.agent \
62+
jdk.management.jfr \
63+
jdk.naming.dns \
64+
jdk.naming.rmi \
65+
jdk.net \
66+
jdk.nio.mapmode \
67+
jdk.sctp \
68+
jdk.security.auth \
69+
jdk.security.jgss \
70+
jdk.xml.dom \
71+
jdk.zipfs \
72+
#

0 commit comments

Comments
 (0)