Skip to content

Commit 346b28a

Browse files
[Automated] Merge in tag jdk-24+13
PullRequest: labsjdk-ce/108
2 parents e0a7d78 + ac434d5 commit 346b28a

File tree

332 files changed

+7417
-1654
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

332 files changed

+7417
-1654
lines changed

make/Main.gmk

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,18 @@ $(eval $(call SetupTarget, eclipse-mixed-env, \
278278
ARGS := --always-make, \
279279
))
280280

281+
$(eval $(call SetupTarget, hotspot-xcode-project, \
282+
MAKEFILE := ide/xcode/hotspot/CreateXcodeProject, \
283+
TARGET := build, \
284+
DEPS := hotspot compile-commands-hotspot jdk-image, \
285+
))
286+
287+
$(eval $(call SetupTarget, open-hotspot-xcode-project, \
288+
MAKEFILE := ide/xcode/hotspot/CreateXcodeProject, \
289+
TARGET := open, \
290+
DEPS := hotspot-xcode-project, \
291+
))
292+
281293
ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \
282294
$(HOTSPOT_VARIANT_LIBS_TARGETS) $(HOTSPOT_VARIANT_STATIC_LIBS_TARGETS)
283295

make/common/FileUtils.gmk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ else
189189
endef
190190
endif
191191

192+
define copy-and-chmod-executable
193+
$(install-file)
194+
$(CHMOD) a+rx $@
195+
endef
196+
192197
################################################################################
193198

194199
# Recursive wildcard function. Walks down directories recursively and matches

make/common/JavaCompilation.gmk

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,26 @@ define SetupJavaCompilationBody
282282
$1_FLAGS += -Xlint:$$(call CommaList, $$(addprefix -, $$($1_DISABLED_WARNINGS)))
283283
endif
284284

285-
ifneq ($$($1_CLASSPATH), )
286-
$1_FLAGS += -cp $$(call PathList, $$($1_CLASSPATH))
285+
$1_AUGMENTED_CLASSPATH := $$($1_CLASSPATH)
286+
$1_API_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_pubapi
287+
$1_API_INTERNAL := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_internalapi
288+
289+
ifeq ($$($1_CREATE_API_DIGEST), true)
290+
$1_API_DIGEST_FLAGS := \
291+
-Xplugin:"depend $$($1_API_TARGET)" \
292+
"-XDinternalAPIPath=$$($1_API_INTERNAL)" \
293+
"-XDLOG_LEVEL=$(LOG_LEVEL)" \
294+
#
295+
296+
$1_EXTRA_DEPS := $$(BUILDTOOLS_OUTPUTDIR)/depend/_the.COMPILE_DEPEND_batch
297+
# including the compilation output on the classpath, so that incremental
298+
# compilations in unnamed module can refer to other classes from the same
299+
# source root, which are not being recompiled in this compilation:
300+
$1_AUGMENTED_CLASSPATH += $$(BUILDTOOLS_OUTPUTDIR)/depend $$($1_BIN)
301+
endif
302+
303+
ifneq ($$($1_AUGMENTED_CLASSPATH), )
304+
$1_FLAGS += -cp $$(call PathList, $$($1_AUGMENTED_CLASSPATH))
287305
endif
288306

289307
# Make sure the dirs exist, or that one of the EXTRA_FILES, that may not
@@ -411,9 +429,6 @@ define SetupJavaCompilationBody
411429
$1_MODFILELIST := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch.modfiles
412430
$1_MODFILELIST_FIXED := $$($1_MODFILELIST).fixed
413431

414-
$1_API_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_pubapi
415-
$1_API_INTERNAL := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_internalapi
416-
417432
# Put headers in a temp dir to filter out those that actually
418433
# changed before copying them to the real header dir.
419434
ifneq (,$$($1_HEADERS))
@@ -442,17 +457,6 @@ define SetupJavaCompilationBody
442457
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
443458
$$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1.vardeps)
444459

445-
ifeq ($$($1_CREATE_API_DIGEST), true)
446-
$1_API_DIGEST_FLAGS := \
447-
-classpath $$(BUILDTOOLS_OUTPUTDIR)/depend \
448-
-Xplugin:"depend $$($1_API_TARGET)" \
449-
"-XDinternalAPIPath=$$($1_API_INTERNAL)" \
450-
"-XDLOG_LEVEL=$(LOG_LEVEL)" \
451-
#
452-
453-
$1_EXTRA_DEPS := $$(BUILDTOOLS_OUTPUTDIR)/depend/_the.COMPILE_DEPEND_batch
454-
endif
455-
456460
# Create a file with all sources, to pass to javac in an @file.
457461
# $$($1_VARDEPS_FILE) is used as dependency to track changes in set of
458462
# list of files.

make/common/NativeCompilation.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ define SetupNativeCompilationBody
222222

223223
ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
224224
# Override all targets (this is a hack)
225-
$1 := $$($1_ALL_OBJS_JSON)
225+
$1 := $$($1_ALL_OBJS_JSON) $$($1_LDFLAGS_FILE)
226226
endif
227227
endef
228228

make/common/native/Link.gmk

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,16 @@ define CreateDynamicLibraryOrExecutable
198198
$(CODESIGN) -f -s $$($1_CODESIGN_OPTS) --entitlements \
199199
$$(call GetEntitlementsFile, $$@) $$@)
200200
endif
201+
202+
# This is for IDE integration purposes only, and is not normally generated
203+
$1_LDFLAGS_FILE := $$(MAKESUPPORT_OUTPUTDIR)/compile-commands/$$($1_NAME)-ldflags.txt
204+
205+
$1_ALL_LD_ARGS := $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
206+
$$($1_LIBS) $$($1_EXTRA_LIBS)
207+
208+
$$($1_LDFLAGS_FILE): $$($1_VARDEPS_FILE)
209+
$$(call LogInfo, Creating compile commands linker flags output for $$($1_BASENAME))
210+
$$(call MakeDir, $$(dir $$@))
211+
$$(ECHO) $$($1_ALL_LD_ARGS) > $$@
212+
201213
endef

make/conf/module-loader-map.conf

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -94,48 +94,26 @@ PLATFORM_MODULES_windows= \
9494

9595
NATIVE_ACCESS_MODULES= \
9696
java.base \
97-
java.datatransfer \
9897
java.desktop \
9998
java.instrument \
100-
java.logging \
10199
java.management \
102-
java.management.rmi \
103-
java.naming \
104-
java.net.http \
105100
java.prefs \
106101
java.rmi \
107-
java.scripting \
108-
java.se \
109102
java.security.jgss \
110-
java.security.sasl \
111103
java.smartcardio \
112-
java.sql \
113-
java.sql.rowset \
114-
java.transaction.xa \
115-
java.xml \
116-
java.xml.crypto \
117104
jdk.accessibility \
118-
jdk.charsets \
105+
jdk.attach \
119106
jdk.crypto.cryptoki \
120-
jdk.dynalink \
121-
jdk.httpserver \
122-
jdk.incubator.vector \
107+
jdk.crypto.mscapi \
108+
jdk.hotspot.agent \
123109
jdk.internal.le \
124110
jdk.internal.vm.ci \
111+
jdk.jdi \
125112
jdk.jfr \
126-
jdk.jsobject \
127-
jdk.localedata \
113+
jdk.jpackage \
128114
jdk.management \
129115
jdk.management.agent \
130-
jdk.management.jfr \
131-
jdk.naming.dns \
132-
jdk.naming.rmi \
133116
jdk.net \
134-
jdk.nio.mapmode \
135117
jdk.sctp \
136118
jdk.security.auth \
137-
jdk.security.jgss \
138-
jdk.unsupported \
139-
jdk.xml.dom \
140-
jdk.zipfs \
141119
#

make/ide/visualstudio/hotspot/CreateVSProject.gmk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -83,7 +83,7 @@ ifeq ($(call isTargetOs, windows), true)
8383
################################################################################
8484
# Build the ProjectCreator java tool.
8585

86-
TOOLS_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/support/ide_classes
86+
TOOLS_OUTPUTDIR := $(MAKESUPPORT_OUTPUTDIR)/ide/visualstudio
8787

8888
$(eval $(call SetupJavaCompilation, BUILD_PROJECT_CREATOR, \
8989
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
#
2+
# Copyright (c) 2023, 2024, 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+
# This must be the first rule
27+
default: all
28+
29+
include $(SPEC)
30+
include MakeBase.gmk
31+
include CopyFiles.gmk
32+
include Execute.gmk
33+
include JavaCompilation.gmk
34+
35+
ifeq ($(call isTargetOs, macosx), true)
36+
##############################################################################
37+
# Build the XcodeProjectMaker java tool.
38+
39+
PROJECT_MAKER_DIR := $(TOPDIR)/make/ide/xcode/hotspot
40+
TOOLS_OUTPUTDIR := $(MAKESUPPORT_OUTPUTDIR)/ide/xcode
41+
IDE_OUTPUTDIR := $(OUTPUTDIR)/xcode
42+
PROJECT_FILE_NAME := hotspot.xcodeproj
43+
44+
COMPILE_COMMAND_FILE := $(OUTPUTDIR)/compile_commands.json
45+
LINKER_FLAGS_FILE := $(MAKESUPPORT_OUTPUTDIR)/compile-commands/jvm-ldflags.txt
46+
47+
$(eval $(call SetupJavaCompilation, BUILD_PROJECT_CREATOR, \
48+
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
49+
SRC := $(PROJECT_MAKER_DIR)/src/classes, \
50+
BIN := $(TOOLS_OUTPUTDIR), \
51+
DISABLED_WARNINGS := rawtypes unchecked serial, \
52+
))
53+
54+
TARGETS += $(BUILD_PROJECT_CREATOR)
55+
56+
# Run the XcodeProjectMaker tool
57+
PROJECT_CREATOR_TOOL := $(JAVA_SMALL) -cp $(TOOLS_OUTPUTDIR) XcodeProjectMaker
58+
59+
ifneq ($(findstring $(LOG_LEVEL), debug trace), )
60+
XCODE_PROJ_DEBUG_OPTION := -d
61+
endif
62+
63+
XCODE_PROJ_VARDEPS := $(WORKSPACE_ROOT) $(IDE_OUTPUTDIR) \
64+
$(PROJECT_MAKER_DIR)/data $(COMPILE_COMMAND_FILE) $(LINKER_FLAGS_FILE)
65+
XCODE_PROJ_VARDEPS_FILE := $(call DependOnVariable, XCODE_PROJ_VARDEPS, \
66+
$(TOOLS_OUTPUTDIR)/xcodeproj.vardeps)
67+
68+
$(eval $(call SetupExecute, build_xcode_project, \
69+
WARN := Generating Xcode project file, \
70+
DEPS := $(BUILD_PROJECT_CREATOR) $(COMPILE_COMMAND_FILE) \
71+
$(LINKER_FLAGS_FILE) $(XCODE_PROJ_VARDEPS_FILE), \
72+
OUTPUT_DIR := $(TOOLS_OUTPUTDIR), \
73+
COMMAND := $(PROJECT_CREATOR_TOOL) $(WORKSPACE_ROOT) $(IDE_OUTPUTDIR) \
74+
$(PROJECT_MAKER_DIR)/data $(COMPILE_COMMAND_FILE) \
75+
$(LINKER_FLAGS_FILE) $(XCODE_PROJ_DEBUG_OPTION), \
76+
))
77+
78+
TARGETS += $(build_xcode_project)
79+
80+
$(eval $(call SetupCopyFiles, copy_xcode_project, \
81+
DEST := $(IDE_OUTPUTDIR), \
82+
FILES := $(PROJECT_MAKER_DIR)/data/script_before.sh $(PROJECT_MAKER_DIR)/data/script_after.sh , \
83+
MACRO := copy-and-chmod-executable, \
84+
))
85+
86+
TARGETS += $(copy_xcode_project)
87+
88+
$(eval $(call SetupExecute, open_xcode_project, \
89+
INFO := Opening Xcode project file, \
90+
DEPS := $(build_xcodeproject_TARGET) FORCE, \
91+
OUTPUT_DIR := $(TOOLS_OUTPUTDIR), \
92+
COMMAND := open $(IDE_OUTPUTDIR)/$(PROJECT_FILE_NAME), \
93+
))
94+
95+
TARGETS += $(open_xcode_project)
96+
97+
# Always call open without considering dependencies being up to date
98+
FORCE:
99+
100+
build: $(build_xcode_project) $(copy_xcode_project)
101+
102+
open: $(open_xcode_project)
103+
104+
all: $(TARGETS)
105+
else
106+
build:
107+
open:
108+
all:
109+
$(info Xcode projects are only supported on macOS)
110+
endif
111+
112+
.PHONY: default all build open
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Bucket
3+
type = "4"
4+
version = "2.0">
5+
<Breakpoints>
6+
<BreakpointProxy
7+
BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint">
8+
<BreakpointContent
9+
shouldBeEnabled = "Yes"
10+
ignoreCount = "0"
11+
continueAfterRunningActions = "Yes"
12+
symbolName = "load_jimage_library"
13+
moduleName = "libjvm.dylib">
14+
<Actions>
15+
<BreakpointActionProxy
16+
ActionExtensionID = "Xcode.BreakpointAction.DebuggerCommand">
17+
<ActionContent
18+
consoleCommand = "process handle -n true -p true -s false SIGSEGV SIGBUS SIGUSR2">
19+
</ActionContent>
20+
</BreakpointActionProxy>
21+
</Actions>
22+
<Locations>
23+
<Location
24+
shouldBeEnabled = "Yes"
25+
ignoreCount = "0"
26+
continueAfterRunningActions = "No"
27+
symbolName = "ClassLoader::load_jimage_library()"
28+
moduleName = "libjvm.dylib"
29+
usesParentBreakpointCondition = "Yes"
30+
timestampString = "0"
31+
startingColumnNumber = "0"
32+
endingColumnNumber = "0"
33+
startingLineNumber = "0"
34+
endingLineNumber = "0"
35+
offsetFromSymbolStart = "0">
36+
</Location>
37+
</Locations>
38+
</BreakpointContent>
39+
</BreakpointProxy>
40+
</Breakpoints>
41+
</Bucket>

0 commit comments

Comments
 (0)