Skip to content

Commit de5929b

Browse files
Merge branch '8311530-depr-jsobject' into WIP-rm-jsobject
2 parents 4842f50 + c3ee6ad commit de5929b

File tree

834 files changed

+18583
-8684
lines changed

Some content is hidden

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

834 files changed

+18583
-8684
lines changed

.github/actions/config/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ runs:
4141
id: read-config
4242
run: |
4343
# Extract value from configuration file
44-
value="$(grep -h ${{ inputs.var }}= make/conf/github-actions.conf | cut -d '=' -f 2-)"
44+
value="$(grep -h '^${{ inputs.var }}'= make/conf/github-actions.conf | cut -d '=' -f 2-)"
4545
echo "value=$value" >> $GITHUB_OUTPUT
4646
shell: bash

.github/actions/upload-bundles/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2022, 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
@@ -45,6 +45,7 @@ runs:
4545
jdk_bundle_tar_gz="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
4646
symbols_bundle="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}-symbols.tar.gz 2> /dev/null || true)"
4747
tests_bundle="$(ls build/*/bundles/jdk-*_bin-tests${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
48+
static_libs_bundle="$(ls build/*/bundles/jdk-*_bin-static-libs${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
4849
4950
mkdir bundles
5051
@@ -60,8 +61,11 @@ runs:
6061
if [[ "$tests_bundle" != "" ]]; then
6162
mv "$tests_bundle" "bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
6263
fi
64+
if [[ "$static_libs_bundle" != "" ]]; then
65+
mv "$static_libs_bundle" "bundles/static-libs-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
66+
fi
6367
64-
if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$symbols_bundle$tests_bundle" != "" ]]; then
68+
if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$symbols_bundle$tests_bundle$static_libs_bundle" != "" ]]; then
6569
echo 'bundles-found=true' >> $GITHUB_OUTPUT
6670
else
6771
echo 'bundles-found=false' >> $GITHUB_OUTPUT
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
#
2+
# Copyright (c) 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+
name: 'Build (alpine-linux)'
27+
28+
on:
29+
workflow_call:
30+
inputs:
31+
platform:
32+
required: true
33+
type: string
34+
extra-conf-options:
35+
required: false
36+
type: string
37+
make-target:
38+
required: false
39+
type: string
40+
default: 'product-bundles test-bundles'
41+
debug-levels:
42+
required: false
43+
type: string
44+
default: '[ "debug", "release" ]'
45+
apk-extra-packages:
46+
required: false
47+
type: string
48+
configure-arguments:
49+
required: false
50+
type: string
51+
make-arguments:
52+
required: false
53+
type: string
54+
55+
jobs:
56+
build-linux:
57+
name: build
58+
runs-on: ubuntu-22.04
59+
container:
60+
image: alpine:3.20
61+
62+
strategy:
63+
fail-fast: false
64+
matrix:
65+
debug-level: ${{ fromJSON(inputs.debug-levels) }}
66+
include:
67+
- debug-level: debug
68+
flags: --with-debug-level=fastdebug
69+
suffix: -debug+
70+
71+
steps:
72+
- name: 'Checkout the JDK source'
73+
uses: actions/checkout@v4
74+
75+
- name: 'Install toolchain and dependencies'
76+
run: |
77+
apk update
78+
apk add alpine-sdk alsa-lib-dev autoconf bash cups-dev cups-libs fontconfig-dev freetype-dev grep libx11-dev libxext-dev libxrandr-dev libxrender-dev libxt-dev libxtst-dev linux-headers wget zip ${{ inputs.apk-extra-packages }}
79+
80+
- name: 'Get the BootJDK'
81+
id: bootjdk
82+
uses: ./.github/actions/get-bootjdk
83+
with:
84+
platform: alpine-linux-x64
85+
86+
- name: 'Configure'
87+
run: >
88+
bash configure
89+
--with-conf-name=${{ inputs.platform }}
90+
${{ matrix.flags }}
91+
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
92+
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
93+
--with-zlib=system
94+
--with-jmod-compress=zip-1
95+
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
96+
echo "Dumping config.log:" &&
97+
cat config.log &&
98+
exit 1)
99+
100+
- name: 'Build'
101+
id: build
102+
uses: ./.github/actions/do-build
103+
with:
104+
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
105+
platform: ${{ inputs.platform }}
106+
debug-suffix: '${{ matrix.suffix }}'
107+
108+
- name: 'Upload bundles'
109+
uses: ./.github/actions/upload-bundles
110+
with:
111+
platform: ${{ inputs.platform }}
112+
debug-suffix: '${{ matrix.suffix }}'

.github/workflows/build-linux.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2022, 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
@@ -133,8 +133,12 @@ jobs:
133133
- name: 'Build'
134134
id: build
135135
uses: ./.github/actions/do-build
136+
env:
137+
# Only build static-libs-bundles for release builds.
138+
# For debug builds, building static-libs often exceeds disk space.
139+
STATIC_LIBS: ${{ matrix.debug-level == 'release' && 'static-libs-bundles' }}
136140
with:
137-
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
141+
make-target: '${{ inputs.make-target }} ${STATIC_LIBS} ${{ inputs.make-arguments }}'
138142
platform: ${{ inputs.platform }}
139143
debug-suffix: '${{ matrix.suffix }}'
140144

.github/workflows/main.yml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ on:
3636
platforms:
3737
description: 'Platform(s) to execute on (comma separated, e.g. "linux-x64, macos, aarch64")'
3838
required: true
39-
default: 'linux-x64, linux-x86-hs, linux-x64-variants, linux-cross-compile, macos-x64, macos-aarch64, windows-x64, windows-aarch64, docs'
39+
default: 'linux-x64, linux-x86-hs, linux-x64-variants, linux-cross-compile, alpine-linux-x64, macos-x64, macos-aarch64, windows-x64, windows-aarch64, docs'
4040
configure-arguments:
4141
description: 'Additional configure arguments'
4242
required: false
@@ -57,11 +57,15 @@ jobs:
5757
select:
5858
name: 'Select platforms'
5959
runs-on: ubuntu-22.04
60+
env:
61+
# List of platforms to exclude by default
62+
EXCLUDED_PLATFORMS: 'alpine-linux-x64'
6063
outputs:
6164
linux-x64: ${{ steps.include.outputs.linux-x64 }}
6265
linux-x86-hs: ${{ steps.include.outputs.linux-x86-hs }}
6366
linux-x64-variants: ${{ steps.include.outputs.linux-x64-variants }}
6467
linux-cross-compile: ${{ steps.include.outputs.linux-cross-compile }}
68+
alpine-linux-x64: ${{ steps.include.outputs.alpine-linux-x64 }}
6569
macos-x64: ${{ steps.include.outputs.macos-x64 }}
6670
macos-aarch64: ${{ steps.include.outputs.macos-aarch64 }}
6771
windows-x64: ${{ steps.include.outputs.windows-x64 }}
@@ -78,6 +82,10 @@ jobs:
7882
# Returns 'true' if the input platform list matches any of the platform monikers given as argument,
7983
# 'false' otherwise.
8084
# arg $1: platform name or names to look for
85+
86+
# Convert EXCLUDED_PLATFORMS from a comma-separated string to an array
87+
IFS=',' read -r -a excluded_array <<< "$EXCLUDED_PLATFORMS"
88+
8189
function check_platform() {
8290
if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
8391
input='${{ github.event.inputs.platforms }}'
@@ -94,7 +102,13 @@ jobs:
94102
95103
normalized_input="$(echo ,$input, | tr -d ' ')"
96104
if [[ "$normalized_input" == ",," ]]; then
97-
# For an empty input, assume all platforms should run
105+
# For an empty input, assume all platforms should run, except those in the EXCLUDED_PLATFORMS list
106+
for excluded in "${excluded_array[@]}"; do
107+
if [[ "$1" == "$excluded" ]]; then
108+
echo 'false'
109+
return
110+
fi
111+
done
98112
echo 'true'
99113
return
100114
else
@@ -105,6 +119,14 @@ jobs:
105119
return
106120
fi
107121
done
122+
123+
# If not explicitly included, check against the EXCLUDED_PLATFORMS list
124+
for excluded in "${excluded_array[@]}"; do
125+
if [[ "$1" == "$excluded" ]]; then
126+
echo 'false'
127+
return
128+
fi
129+
done
108130
fi
109131
110132
echo 'false'
@@ -114,6 +136,7 @@ jobs:
114136
echo "linux-x86-hs=$(check_platform linux-x86-hs linux x86)" >> $GITHUB_OUTPUT
115137
echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
116138
echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
139+
echo "alpine-linux-x64=$(check_platform alpine-linux-x64 alpine-linux x64)" >> $GITHUB_OUTPUT
117140
echo "macos-x64=$(check_platform macos-x64 macos x64)" >> $GITHUB_OUTPUT
118141
echo "macos-aarch64=$(check_platform macos-aarch64 macos aarch64)" >> $GITHUB_OUTPUT
119142
echo "windows-x64=$(check_platform windows-x64 windows x64)" >> $GITHUB_OUTPUT
@@ -221,6 +244,16 @@ jobs:
221244
make-arguments: ${{ github.event.inputs.make-arguments }}
222245
if: needs.select.outputs.linux-cross-compile == 'true'
223246

247+
build-alpine-linux-x64:
248+
name: alpine-linux-x64
249+
needs: select
250+
uses: ./.github/workflows/build-alpine-linux.yml
251+
with:
252+
platform: alpine-linux-x64
253+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
254+
make-arguments: ${{ github.event.inputs.make-arguments }}
255+
if: needs.select.outputs.alpine-linux-x64 == 'true'
256+
224257
build-macos-x64:
225258
name: macos-x64
226259
needs: select
@@ -344,6 +377,7 @@ jobs:
344377
- build-linux-x64-hs-minimal
345378
- build-linux-x64-hs-optimized
346379
- build-linux-cross-compile
380+
- build-alpine-linux-x64
347381
- build-macos-x64
348382
- build-macos-aarch64
349383
- build-windows-x64

make/Bundles.gmk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
284284
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
285285
# Macosx release build and code signing available.
286286

287-
################################################################################
287+
############################################################################
288288
# JDK bundle
289289
$(eval $(call SetupCopyFiles, CREATE_JDK_BUNDLE_DIR_SIGNED, \
290290
SRC := $(JDK_IMAGE_DIR), \
@@ -313,7 +313,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
313313

314314
PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
315315

316-
################################################################################
316+
############################################################################
317317
# JRE bundle
318318
$(eval $(call SetupCopyFiles, CREATE_JRE_BUNDLE_DIR_SIGNED, \
319319
SRC := $(JRE_IMAGE_DIR), \

make/CompileInterimLangtools.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ $(BUILDTOOLS_OUTPUTDIR)/gensrc/java.compiler.interim/javax/tools/ToolProvider.ja
6565
$(SED) $(INTERIM_TOOL_PROVIDER_PATTERN) $< > $@
6666

6767
java.compiler.interim_EXTRA_FILES := \
68-
$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.compiler.interim/javax/tools/ToolProvider.java
68+
$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.compiler.interim/javax/tools/ToolProvider.java
6969

7070
TARGETS += $(BUILDTOOLS_OUTPUTDIR)/gensrc/java.compiler.interim/javax/tools/ToolProvider.java
7171

make/CompileJavaModules.gmk

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ $(JDK_OUTPUTDIR)/modules/%_zh_HK.properties: $(JDK_OUTPUTDIR)/modules/%_zh_TW.pr
7575

7676
CreateHkTargets = \
7777
$(call FilterExcludedTranslations, \
78-
$(patsubst $(TOPDIR)/src/%, $(JDK_OUTPUTDIR)/modules/%, \
79-
$(subst /share/classes,, \
80-
$(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $1)) \
81-
) \
82-
), \
83-
.properties \
78+
$(patsubst $(TOPDIR)/src/%, $(JDK_OUTPUTDIR)/modules/%, \
79+
$(subst /share/classes,, \
80+
$(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $1)) \
81+
) \
82+
), \
83+
.properties \
8484
)
8585

8686
################################################################################

make/CompileToolsJdk.gmk

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
5252
build/tools/deps \
5353
build/tools/docs \
5454
build/tools/jigsaw \
55-
build/tools/depend \
56-
, \
55+
build/tools/depend, \
5756
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
5857
DISABLED_WARNINGS := dangling-doc-comments options, \
5958
JAVAC_FLAGS := \
@@ -66,17 +65,19 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
6665

6766
TARGETS += $(BUILD_TOOLS_JDK)
6867

69-
$(eval $(call SetupCopyFiles,COPY_NIMBUS_TEMPLATES, \
68+
$(eval $(call SetupCopyFiles, COPY_NIMBUS_TEMPLATES, \
7069
SRC := $(TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus, \
7170
DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/generatenimbus/resources, \
72-
FILES := $(wildcard $(TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template)))
71+
FILES := $(wildcard $(TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template), \
72+
))
7373

7474
TARGETS += $(COPY_NIMBUS_TEMPLATES)
7575

76-
$(eval $(call SetupCopyFiles,COPY_CLDRCONVERTER_PROPERTIES, \
76+
$(eval $(call SetupCopyFiles, COPY_CLDRCONVERTER_PROPERTIES, \
7777
SRC := $(TOPDIR)/make/jdk/src/classes/build/tools/cldrconverter, \
7878
DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/cldrconverter, \
79-
FILES := $(wildcard $(TOPDIR)/make/jdk/src/classes/build/tools/cldrconverter/*.properties)))
79+
FILES := $(wildcard $(TOPDIR)/make/jdk/src/classes/build/tools/cldrconverter/*.properties), \
80+
))
8081

8182
TARGETS += $(COPY_CLDRCONVERTER_PROPERTIES)
8283

make/CopyInterimTZDB.gmk

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ include MakeBase.gmk
3030

3131
include CopyFiles.gmk
3232

33-
##########################################################################################
33+
################################################################################
3434

3535
### TZDB tool needs files from java.time.zone package
3636

@@ -41,12 +41,13 @@ define tzdb_copyfiles
4141
< $(<) > $@
4242
endef
4343

44-
$(eval $(call SetupCopyFiles,COPY_INTERIM_TZDB, \
44+
$(eval $(call SetupCopyFiles, COPY_INTERIM_TZDB, \
4545
SRC := $(TOPDIR)/src/java.base/share/classes/java/time/zone, \
4646
DEST := $(BUILDTOOLS_OUTPUTDIR)/interim_tzdb_classes/build/tools/tzdb, \
4747
FILES := ZoneRules.java ZoneOffsetTransition.java ZoneOffsetTransitionRule.java Ser.java, \
48-
MACRO := tzdb_copyfiles))
48+
MACRO := tzdb_copyfiles, \
49+
))
4950

50-
##########################################################################################
51+
################################################################################
5152

5253
all: $(COPY_INTERIM_TZDB)

0 commit comments

Comments
 (0)