+54









David Simms
Dan Smith
Frederic Parain
Tobias Hartmann
Roger Riggs
Vicente Romero
Axel Boldt-Christmas
Karen Kinnear
Alex Menkov
Bill Huang
Benoît Maillard
Christian Hagedorn
Chris Plummer
Casper Norrbin
Coleen Phillimore
David Beaumont
Daniel D. Daugherty
Damon Fenacci
David Holmes
Dmitry Samersoff
Eric Caspole
Evgeny Nikitin
Ekaterina Pavlova
Fei Yang
Dan Heidinga
Harold Seigel
Ioi Lam
Ivan Walulya
Jatin Bhateja
Jan Lahoda
Jim Laskey
John R Rose
Joel Sikström
Lois Foltan
Chen Liang
Leonid Mesnik
Matias Saavedra Silva
Marc Chevalier
Mandy Chung
Maurizio Cimadamore
Markus Grönlund
Manuel Hässig
Nick Gasson
Patricio Chilano Mateo
Paul Hübner
Paul Sandoz
Quan Anh Mai
Roberto Castañeda Lozano
Roland Westrelin
Srikanth Adayapalam
Aleksey Shipilev
Stefan Johansson
Sergey Kuksenko
Serguei Spitsyn
Stefan Karlsson
Thomas Stuefe
Thomas Schatzl
Zoltan Majo
Alan Bateman
Jaikiran Pai
Martin Doerr
Richard Reingruber
Feilong Jiang
Daisuke Yamazaki
cc278dbb8a
8389220: Implement JEP 539: Strict Field Initialization in the JVM (Preview) Co-authored-by: David Simms <dsimms@openjdk.org> Co-authored-by: Dan Smith <dlsmith@openjdk.org> Co-authored-by: Frederic Parain <fparain@openjdk.org> Co-authored-by: Tobias Hartmann <thartmann@openjdk.org> Co-authored-by: Roger Riggs <rriggs@openjdk.org> Co-authored-by: Vicente Romero <vromero@openjdk.org> Co-authored-by: Axel Boldt-Christmas <aboldtch@openjdk.org> Co-authored-by: Karen Kinnear <acorn@openjdk.org> Co-authored-by: Alex Menkov <amenkov@openjdk.org> Co-authored-by: Bill Huang <bhuang@openjdk.org> Co-authored-by: Benoît Maillard <bmaillard@openjdk.org> Co-authored-by: Christian Hagedorn <chagedorn@openjdk.org> Co-authored-by: Chris Plummer <cjplummer@openjdk.org> Co-authored-by: Casper Norrbin <cnorrbin@openjdk.org> Co-authored-by: Coleen Phillimore <coleenp@openjdk.org> Co-authored-by: David Beaumont <dbeaumont@openjdk.org> Co-authored-by: Daniel D. Daugherty <dcubed@openjdk.org> Co-authored-by: Damon Fenacci <dfenacci@openjdk.org> Co-authored-by: David Holmes <dholmes@openjdk.org> Co-authored-by: Dmitry Samersoff <dsamersoff@openjdk.org> Co-authored-by: Eric Caspole <ecaspole@openjdk.org> Co-authored-by: Evgeny Nikitin <enikitin@openjdk.org> Co-authored-by: Ekaterina Pavlova <epavlova@openjdk.org> Co-authored-by: Fei Yang <fyang@openjdk.org> Co-authored-by: Dan Heidinga <heidinga@openjdk.org> Co-authored-by: Harold Seigel <hseigel@openjdk.org> Co-authored-by: Ioi Lam <iklam@openjdk.org> Co-authored-by: Ivan Walulya <iwalulya@openjdk.org> Co-authored-by: Jatin Bhateja <jbhateja@openjdk.org> Co-authored-by: Jan Lahoda <jlahoda@openjdk.org> Co-authored-by: Jim Laskey <jlaskey@openjdk.org> Co-authored-by: John R Rose <jrose@openjdk.org> Co-authored-by: Joel Sikström <jsikstro@openjdk.org> Co-authored-by: Lois Foltan <lfoltan@openjdk.org> Co-authored-by: Chen Liang <liach@openjdk.org> Co-authored-by: Leonid Mesnik <lmesnik@openjdk.org> Co-authored-by: Matias Saavedra Silva <matsaave@openjdk.org> Co-authored-by: Marc Chevalier <mchevalier@openjdk.org> Co-authored-by: Mandy Chung <mchung@openjdk.org> Co-authored-by: Maurizio Cimadamore <mcimadamore@openjdk.org> Co-authored-by: Markus Grönlund <mgronlun@openjdk.org> Co-authored-by: Manuel Hässig <mhaessig@openjdk.org> Co-authored-by: Nick Gasson <ngasson@openjdk.org> Co-authored-by: Patricio Chilano Mateo <pchilanomate@openjdk.org> Co-authored-by: Paul Hübner <phubner@openjdk.org> Co-authored-by: Paul Sandoz <psandoz@openjdk.org> Co-authored-by: Quan Anh Mai <qamai@openjdk.org> Co-authored-by: Roberto Castañeda Lozano <rcastanedalo@openjdk.org> Co-authored-by: Roland Westrelin <roland@openjdk.org> Co-authored-by: Srikanth Adayapalam <sadayapalam@openjdk.org> Co-authored-by: Aleksey Shipilev <shade@openjdk.org> Co-authored-by: Stefan Johansson <sjohanss@openjdk.org> Co-authored-by: Sergey Kuksenko <skuksenko@openjdk.org> Co-authored-by: Serguei Spitsyn <sspitsyn@openjdk.org> Co-authored-by: Stefan Karlsson <stefank@openjdk.org> Co-authored-by: Thomas Stuefe <stuefe@openjdk.org> Co-authored-by: Thomas Schatzl <tschatzl@openjdk.org> Co-authored-by: Zoltan Majo <zmajo@openjdk.org> Co-authored-by: Alan Bateman <alanb@openjdk.org> Co-authored-by: Jaikiran Pai <jpai@openjdk.org> Co-authored-by: Martin Doerr <mdoerr@openjdk.org> Co-authored-by: Richard Reingruber <rrich@openjdk.org> Co-authored-by: Feilong Jiang <fjiang@openjdk.org> Co-authored-by: Daisuke Yamazaki <dyama@openjdk.org> Reviewed-by: mcimadamore, liach, darcy, dcubed, aboldtch, coleenp, iklam, jlahoda, dlong, jpai, vklang, heidinga, sspitsyn, cjplummer
350 lines
13 KiB
Plaintext
350 lines
13 KiB
Plaintext
#
|
|
# Copyright (c) 2014, 2026, 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.
|
|
#
|
|
|
|
include MakeIncludeStart.gmk
|
|
ifeq ($(INCLUDE), true)
|
|
|
|
################################################################################
|
|
# Setup module sets for classloaders
|
|
|
|
include $(TOPDIR)/make/conf/module-loader-map.conf
|
|
|
|
# Append platform-specific and upgradeable modules
|
|
PLATFORM_MODULES += $(PLATFORM_MODULES_$(OPENJDK_TARGET_OS)) \
|
|
$(UPGRADEABLE_PLATFORM_MODULES) $(CUSTOM_UPGRADEABLE_PLATFORM_MODULES)
|
|
|
|
################################################################################
|
|
# Setup module sets for docs
|
|
|
|
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
|
|
|
|
# jpackage is only on windows, macosx, and linux
|
|
ifeq ($(call isTargetOs, windows macosx linux), false)
|
|
MODULES_FILTER += jdk.jpackage
|
|
endif
|
|
|
|
################################################################################
|
|
# Module list macros
|
|
|
|
# Use append so that the custom extension may add to these variables
|
|
|
|
GENERATED_SRC_DIRS += \
|
|
$(SUPPORT_OUTPUTDIR)/gensrc \
|
|
#
|
|
|
|
# Directories in which generated preview classes may exist.
|
|
# Currently this is restricted to generated value classes, but can be extended.
|
|
GENERATED_PREVIEW_SUBDIRS += \
|
|
$(SUPPORT_OUTPUTDIR)/gensrc-valueclasses \
|
|
#
|
|
|
|
TOP_SRC_DIRS += \
|
|
$(TOPDIR)/src \
|
|
#
|
|
|
|
SRC_SUBDIRS += $(OPENJDK_TARGET_OS)/classes
|
|
ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_TYPE))
|
|
SRC_SUBDIRS += $(OPENJDK_TARGET_OS_TYPE)/classes
|
|
endif
|
|
SRC_SUBDIRS += share/classes
|
|
|
|
SPEC_SUBDIRS += share/specs
|
|
|
|
MAN_SUBDIRS += share/man $(TARGET_OS)/man
|
|
|
|
# The docs should include the sum of all man pages for all platforms
|
|
MAN_DOCS_SUBDIRS += share/man windows/man
|
|
|
|
# Find all module-info.java files for the current build target platform and
|
|
# configuration.
|
|
# Param 1 - Module to find for, set to * for finding all
|
|
FindAllModuleInfos = \
|
|
$(sort $(wildcard \
|
|
$(foreach sub, $(SRC_SUBDIRS), \
|
|
$(patsubst %,%/$(strip $1)/$(sub)/module-info.java, $(TOP_SRC_DIRS))) \
|
|
$(patsubst %,%/$(strip $1)/module-info.java, $(IMPORT_MODULES_SRC))))
|
|
|
|
# Find module-info.java files in the specific source dir
|
|
# Param 1 - Src dir to find module-info.java files in
|
|
FindModuleInfosForSrcDir = \
|
|
$(wildcard \
|
|
$(foreach sub, $(SRC_SUBDIRS), \
|
|
$(patsubst %,%/*/$(sub)/module-info.java, $(strip $1)) \
|
|
) \
|
|
$(patsubst %,%/*/module-info.java, $(strip $1)) \
|
|
)
|
|
|
|
# Extract the module names from the paths of module-info.java files. The
|
|
# position of the module directory differs depending on if this is an imported
|
|
# src dir or not.
|
|
GetModuleNameFromModuleInfo = \
|
|
$(strip $(foreach mi, $1, \
|
|
$(if $(filter $(addsuffix %, $(IMPORT_MODULES_SRC)), $(mi)), \
|
|
$(notdir $(patsubst %/,%, $(dir $(mi)))), \
|
|
$(notdir $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir $(mi)))))))))))
|
|
|
|
# Find all modules by looking for module-info.java files and looking at parent
|
|
# directories.
|
|
FindAllModules = \
|
|
$(sort $(filter-out $(MODULES_FILTER), \
|
|
$(call GetModuleNameFromModuleInfo, $(MODULE_INFOS))))
|
|
|
|
# Find all modules in a specific src dir
|
|
# Param 1 - Src dir to find modules in
|
|
FindModulesForSrcDir = \
|
|
$(sort $(filter-out $(MODULES_FILTER), \
|
|
$(call GetModuleNameFromModuleInfo, $(call FindModuleInfosForSrcDir, $1)) \
|
|
))
|
|
|
|
FindImportedModules = \
|
|
$(filter-out $(MODULES_FILTER), \
|
|
$(if $(IMPORT_MODULES_CLASSES), $(notdir $(wildcard $(IMPORT_MODULES_CLASSES)/*))))
|
|
|
|
# Find all source dirs for a particular module
|
|
# $1 - Module to find source dirs for
|
|
FindModuleSrcDirs = \
|
|
$(strip $(wildcard \
|
|
$(addsuffix /$(strip $1), $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \
|
|
$(foreach sub, $(SRC_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS)))))
|
|
|
|
# Find preview class source dirs for a particular module.
|
|
# Currently this is restricted to generated value classes, but can be extended.
|
|
# $1 - Module to find source dirs for
|
|
FindModulePreviewSrcDirs = \
|
|
$(strip $(wildcard \
|
|
$(addsuffix /$(strip $1), $(GENERATED_PREVIEW_SUBDIRS))))
|
|
|
|
# Find all specs dirs for a particular module
|
|
# $1 - Module to find specs dirs for
|
|
FindModuleSpecsDirs = \
|
|
$(strip $(wildcard \
|
|
$(foreach sub, $(SPEC_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS)))))
|
|
|
|
# Find all man dirs for a particular module
|
|
# $1 - Module to find man dirs for
|
|
FindModuleManDirs = \
|
|
$(strip $(wildcard \
|
|
$(foreach sub, $(MAN_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS)))))
|
|
|
|
FindModuleManDirsForDocs = \
|
|
$(strip $(wildcard \
|
|
$(foreach sub, $(MAN_DOCS_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS)))))
|
|
|
|
# Construct the complete module source path
|
|
GetModuleSrcPath = \
|
|
$(call PathList, \
|
|
$(addsuffix /*, $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \
|
|
$(foreach sub, $(SRC_SUBDIRS), $(addsuffix /*/$(sub), $(TOP_SRC_DIRS))))
|
|
|
|
# Construct the complete module source path for preview classes.
|
|
# Currently this is restricted to generated value classes, but can be extended.
|
|
GetModulePreviewSrcPath = \
|
|
$(call PathList, \
|
|
$(addsuffix /*, $(GENERATED_PREVIEW_SUBDIRS) $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \
|
|
$(foreach sub, $(SRC_SUBDIRS), $(addsuffix /*/$(sub), $(TOP_SRC_DIRS))))
|
|
|
|
################################################################################
|
|
# Extract module dependencies from module-info.java files, both normal
|
|
# dependencies ("requires"), and indirect exports ("requires transitive").
|
|
|
|
MODULE_DEPS_MAKEFILE := $(MAKESUPPORT_OUTPUTDIR)/module-deps.gmk
|
|
|
|
MODULE_INFOS := $(call FindAllModuleInfos, *)
|
|
|
|
ifeq ($(GENERATE_MODULE_DEPS_FILE), true)
|
|
$(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \
|
|
$(call DependOnVariable, MODULE_INFOS, $(MAKESUPPORT_OUTPUTDIR)/MODULE_INFOS.vardeps)
|
|
$(call MakeTargetDir)
|
|
$(RM) $@
|
|
$(foreach m, $(MODULE_INFOS), \
|
|
( $(PRINTF) "DEPS_%s := " "$(call GetModuleNameFromModuleInfo, $m)" && \
|
|
$(AWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) ' \
|
|
BEGIN { if (MODULE != "java.base") printf(" java.base"); } \
|
|
/^ *requires/ { sub(/;/, ""); \
|
|
sub(/requires /, " "); \
|
|
sub(/ static /, " "); \
|
|
sub(/ transitive /, " "); \
|
|
sub(/\/\/.*/, ""); \
|
|
sub(/\/\*.*\*\//, ""); \
|
|
gsub(/^ +\*.*/, ""); \
|
|
gsub(/ /, ""); \
|
|
gsub(/\r/, ""); \
|
|
printf(" %s", $$0) } \
|
|
END { printf("\n") }' $m && \
|
|
$(PRINTF) "TRANSITIVE_MODULES_%s := " "$(call GetModuleNameFromModuleInfo, $m)" && \
|
|
$(AWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) ' \
|
|
BEGIN { if (MODULE != "java.base") printf(" java.base"); } \
|
|
/^ *requires *transitive/ { \
|
|
sub(/;/, ""); \
|
|
sub(/requires/, ""); \
|
|
sub(/transitive/, ""); \
|
|
sub(/\/\/.*/, ""); \
|
|
sub(/\/\*.*\*\//, ""); \
|
|
gsub(/^ +\*.*/, ""); \
|
|
gsub(/ /, ""); \
|
|
gsub(/\r/, ""); \
|
|
printf(" %s", $$0) } \
|
|
END { printf("\n") }' $m \
|
|
) >> $@ $(NEWLINE))
|
|
endif
|
|
|
|
-include $(MODULE_DEPS_MAKEFILE)
|
|
|
|
# Find dependencies ("requires") for a given module.
|
|
# Param 1: Module to find dependencies for.
|
|
FindDepsForModule = \
|
|
$(filter-out $(IMPORT_MODULES), $(DEPS_$(strip $1)))
|
|
|
|
# Find dependencies ("requires") transitively in 3 levels for a given module.
|
|
# Param 1: Module to find dependencies for.
|
|
FindTransitiveDepsForModule = \
|
|
$(sort $(call FindDepsForModule, $1) \
|
|
$(foreach m, $(call FindDepsForModule, $1), \
|
|
$(call FindDepsForModule, $m) \
|
|
$(foreach n, $(call FindDepsForModule, $m), \
|
|
$(call FindDepsForModule, $n))))
|
|
|
|
# Find dependencies ("requires") transitively in 3 levels for a set of modules.
|
|
# Param 1: List of modules to find dependencies for.
|
|
FindTransitiveDepsForModules = \
|
|
$(sort $(foreach m, $1, $(call FindTransitiveDepsForModule, $m)))
|
|
|
|
# Find indirect exported modules ("requires transitive") for a given module .
|
|
# Param 1: Module to find indirect exported modules for.
|
|
FindIndirectExportsForModule = \
|
|
$(TRANSITIVE_MODULES_$(strip $1))
|
|
|
|
# Finds indirect exported modules transitively in 3 levels for a given module.
|
|
# Param 1: Module to find indirect exported modules for.
|
|
FindTransitiveIndirectDepsForModule = \
|
|
$(sort $(call FindIndirectExportsForModule, $1) \
|
|
$(foreach m, $(call FindIndirectExportsForModule, $1), \
|
|
$(call FindIndirectExportsForModule, $m) \
|
|
$(foreach n, $(call FindIndirectExportsForModule, $m), \
|
|
$(call FindIndirectExportsForModule, $n))))
|
|
|
|
# Finds indirect exported modules transitively in 3 levels for a set of modules.
|
|
# Param 1: List of modules to find indirect exported modules for.
|
|
FindTransitiveIndirectDepsForModules = \
|
|
$(sort $(foreach m, $1, $(call FindTransitiveIndirectDepsForModule, $m)))
|
|
|
|
# Upgradeable modules are those that are either defined as upgradeable or that
|
|
# require an upradeable module.
|
|
FindAllUpgradeableModules = \
|
|
$(sort $(filter-out $(MODULES_FILTER), \
|
|
$(UPGRADEABLE_PLATFORM_MODULES) $(CUSTOM_UPGRADEABLE_PLATFORM_MODULES)))
|
|
|
|
################################################################################
|
|
|
|
LEGAL_SUBDIRS += $(OPENJDK_TARGET_OS)/legal
|
|
ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_TYPE))
|
|
LEGAL_SUBDIRS += $(OPENJDK_TARGET_OS_TYPE)/legal
|
|
endif
|
|
LEGAL_SUBDIRS += share/legal
|
|
|
|
# Find all legal src dirs for a particular module
|
|
# $1 - Module to find legal dirs for
|
|
FindModuleLegalSrcDirs = \
|
|
$(strip $(wildcard \
|
|
$(addsuffix /$(strip $1), $(IMPORT_MODULES_LEGAL)) \
|
|
$(foreach sub, $(LEGAL_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS))) \
|
|
))
|
|
|
|
################################################################################
|
|
|
|
# Param 1 - Name of module
|
|
define ReadSingleImportMetaData
|
|
ifneq ($$(wildcard $(IMPORT_MODULES_MAKE)/$$(strip $1)/build.properties), )
|
|
classloader :=
|
|
include_in_jre :=
|
|
include_in_jdk :=
|
|
include $(IMPORT_MODULES_MAKE)/$$(strip $1)/build.properties
|
|
ifeq ($$(include_in_jre), true)
|
|
JRE_MODULES += $1
|
|
endif
|
|
ifeq ($$(include_in_jdk), true)
|
|
JDK_MODULES += $1
|
|
endif
|
|
ifeq ($$(classloader), boot)
|
|
BOOT_MODULES += $1
|
|
else ifeq ($$(classloader), ext)
|
|
PLATFORM_MODULES += $1
|
|
endif
|
|
ifneq ($$(include_in_docs), false)
|
|
# defaults to true if unspecified
|
|
DOCS_MODULES += $1
|
|
endif
|
|
else
|
|
# Default to include in all
|
|
JRE_MODULES += $1
|
|
JDK_MODULES += $1
|
|
endif
|
|
endef
|
|
|
|
# Reading the imported modules metadata has a cost, so to make it available,
|
|
# a makefile needs to eval-call this macro first. After calling this, the
|
|
# following variables are populated with data from the imported modules:
|
|
# * JRE_MODULES
|
|
# * JDK_MODULES
|
|
# * BOOT_MODULES
|
|
# * PLATFORM_MODULES
|
|
define ReadImportMetaData
|
|
IMPORTED_MODULES := $$(call FindImportedModules)
|
|
$$(foreach m, $$(IMPORTED_MODULES), \
|
|
$$(eval $$(call ReadSingleImportMetaData, $$m)))
|
|
endef
|
|
|
|
################################################################################
|
|
# Get a full snippet path for the current module and a given base name.
|
|
#
|
|
# Param 1 - The base name of the snippet file to include
|
|
GetModuleSnippetName = \
|
|
$(if $(CUSTOM_MODULE_MAKE_ROOT), \
|
|
$(if $(wildcard $(CUSTOM_MODULE_MAKE_ROOT)/$(MODULE)/$(strip $1).gmk), \
|
|
$(CUSTOM_MODULE_MAKE_ROOT)/$(MODULE)/$(strip $1).gmk, \
|
|
$(wildcard modules/$(MODULE)/$(strip $1).gmk) \
|
|
), \
|
|
$(wildcard modules/$(MODULE)/$(strip $1).gmk) \
|
|
)
|
|
|
|
################################################################################
|
|
|
|
endif # include guard
|
|
include MakeIncludeEnd.gmk
|