Skip to content

Commit 1a8518c

Browse files
authored
Merge pull request #5 from openjdk/master
Update forked branch.
2 parents 865cbe6 + fa9c865 commit 1a8518c

File tree

6,824 files changed

+630985
-131829
lines changed

Some content is hidden

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

6,824 files changed

+630985
-131829
lines changed

.github/workflows/submit.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
if: steps.check_submit.outputs.should_run != 'false'
6868

6969
- name: Determine the jtreg ref to checkout
70-
run: "echo JTREG_REF=jtreg${{ fromJson(steps.check_deps.outputs.dependencies).JTREG_VERSION }}-${{ fromJson(steps.check_deps.outputs.dependencies).JTREG_BUILD }} >> $GITHUB_ENV"
70+
run: "echo JTREG_REF=jtreg-${{ fromJson(steps.check_deps.outputs.dependencies).JTREG_VERSION }}+${{ fromJson(steps.check_deps.outputs.dependencies).JTREG_BUILD }} >> $GITHUB_ENV"
7171
if: steps.check_submit.outputs.should_run != 'false'
7272

7373
- name: Check if a jtreg image is present in the cache
@@ -87,7 +87,7 @@ jobs:
8787
if: steps.check_submit.outputs.should_run != 'false' && steps.jtreg.outputs.cache-hit != 'true'
8888

8989
- name: Build jtreg
90-
run: sh make/build-all.sh ${JAVA_HOME_8_X64}
90+
run: bash make/build.sh --jdk ${JAVA_HOME_8_X64}
9191
working-directory: jtreg
9292
if: steps.check_submit.outputs.should_run != 'false' && steps.jtreg.outputs.cache-hit != 'true'
9393

@@ -174,7 +174,7 @@ jobs:
174174
- name: Install dependencies
175175
run: |
176176
sudo apt-get update
177-
sudo apt-get install gcc-10=10.2.0-5ubuntu1~20.04 g++-10=10.2.0-5ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
177+
sudo apt-get install gcc-10=10.3.0-1ubuntu1~20.04 g++-10=10.3.0-1ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
178178
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
179179
180180
- name: Configure
@@ -489,12 +489,12 @@ jobs:
489489

490490
- name: Install native host dependencies
491491
run: |
492-
sudo apt-get install gcc-10=10.2.0-5ubuntu1~20.04 g++-10=10.2.0-5ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
492+
sudo apt-get install gcc-10=10.3.0-1ubuntu1~20.04 g++-10=10.3.0-1ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
493493
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
494494
if: matrix.debian-arch == ''
495495

496496
- name: Install cross-compilation host dependencies
497-
run: sudo apt-get install gcc-10-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=10.2.0-5ubuntu1~20.04cross1 g++-10-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=10.2.0-5ubuntu1~20.04cross1
497+
run: sudo apt-get install gcc-10-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=10.3.0-1ubuntu1~20.04cross1 g++-10-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=10.3.0-1ubuntu1~20.04cross1
498498
if: matrix.debian-arch != ''
499499

500500
- name: Cache sysroot
@@ -912,7 +912,7 @@ jobs:
912912
run: >
913913
Start-Process -FilePath 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe' -Wait -NoNewWindow -ArgumentList
914914
'modify --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" --quiet
915-
--add Microsoft.VisualStudio.Component.VC.14.28.arm64'
915+
--add Microsoft.VisualStudio.Component.VC.14.29.arm64'
916916
917917
- name: Configure
918918
run: >
@@ -921,7 +921,7 @@ jobs:
921921
$env:BOOT_JDK = cygpath "$HOME/bootjdk/$env:BOOT_JDK_VERSION" ;
922922
& bash configure
923923
--with-conf-name=windows-aarch64
924-
--with-msvc-toolset-version=14.28
924+
--with-msvc-toolset-version=14.29
925925
--openjdk-target=aarch64-unknown-cygwin
926926
${{ matrix.flags }}
927927
--with-version-opt="$env:GITHUB_ACTOR-$env:GITHUB_SHA"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ NashornProfile.txt
1616
**/JTreport/**
1717
**/JTwork/**
1818
/src/utils/LogCompilation/target/
19+
/.project/
20+
/.settings/

bin/idea.sh

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# Shell script for generating an IDEA project from a given list of modules
2626

2727
usage() {
28-
echo "usage: $0 [-h|--help] [-v|--verbose] [-o|--output <path>] [modules]+"
28+
echo "usage: $0 [-h|--help] [-v|--verbose] [-o|--output <path>] [-c|--conf <conf_name>] [modules]+"
2929
exit 1
3030
}
3131

@@ -37,6 +37,7 @@ cd $TOP;
3737

3838
IDEA_OUTPUT=$TOP/.idea
3939
VERBOSE="false"
40+
CONF_ARG=
4041
while [ $# -gt 0 ]
4142
do
4243
case $1 in
@@ -52,6 +53,10 @@ do
5253
IDEA_OUTPUT=$2/.idea
5354
shift
5455
;;
56+
-c | --conf )
57+
CONF_ARG="CONF_NAME=$2"
58+
shift
59+
;;
5560

5661
-*) # bad option
5762
usage
@@ -64,6 +69,9 @@ do
6469
shift
6570
done
6671

72+
if [ -e $IDEA_OUTPUT ] ; then
73+
rm -r $IDEA_OUTPUT
74+
fi
6775
mkdir -p $IDEA_OUTPUT || exit 1
6876
cd $IDEA_OUTPUT; IDEA_OUTPUT=`pwd`
6977

@@ -91,7 +99,7 @@ if [ "$VERBOSE" = "true" ] ; then
9199
echo "idea template dir: $IDEA_TEMPLATE"
92100
fi
93101

94-
cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I $MAKE_DIR/.. idea MAKEOVERRIDES= OUT=$IDEA_OUTPUT/env.cfg MODULES="$*" || exit 1
102+
cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I $MAKE_DIR/.. idea MAKEOVERRIDES= OUT=$IDEA_OUTPUT/env.cfg MODULES="$*" $CONF_ARG || exit 1
95103
cd $SCRIPT_DIR
96104

97105
. $IDEA_OUTPUT/env.cfg
@@ -148,14 +156,14 @@ add_replacement "###MODULE_NAMES###" "$MODULE_NAMES"
148156
add_replacement "###VCS_TYPE###" "$VCS_TYPE"
149157
SPEC_DIR=`dirname $SPEC`
150158
if [ "x$CYGPATH" != "x" ]; then
151-
add_replacement "###BUILD_DIR###" "`cygpath -am $SPEC_DIR`"
152-
add_replacement "###IMAGES_DIR###" "`cygpath -am $SPEC_DIR`/images/jdk"
153-
add_replacement "###ROOT_DIR###" "`cygpath -am $TOPLEVEL_DIR`"
154-
add_replacement "###IDEA_DIR###" "`cygpath -am $IDEA_OUTPUT`"
159+
add_replacement "###BUILD_DIR###" "`$CYGPATH -am $SPEC_DIR`"
160+
add_replacement "###IMAGES_DIR###" "`$CYGPATH -am $SPEC_DIR`/images/jdk"
161+
add_replacement "###ROOT_DIR###" "`$CYGPATH -am $TOPLEVEL_DIR`"
162+
add_replacement "###IDEA_DIR###" "`$CYGPATH -am $IDEA_OUTPUT`"
155163
if [ "x$JT_HOME" = "x" ]; then
156164
add_replacement "###JTREG_HOME###" ""
157165
else
158-
add_replacement "###JTREG_HOME###" "`cygpath -am $JT_HOME`"
166+
add_replacement "###JTREG_HOME###" "`$CYGPATH -am $JT_HOME`"
159167
fi
160168
elif [ "x$WSL_DISTRO_NAME" != "x" ]; then
161169
add_replacement "###BUILD_DIR###" "`wslpath -am $SPEC_DIR`"
@@ -180,7 +188,7 @@ SOURCE_POSTFIX="\" isTestSource=\"false\" />"
180188

181189
for root in $MODULE_ROOTS; do
182190
if [ "x$CYGPATH" != "x" ]; then
183-
root=`cygpath -am $root`
191+
root=`$CYGPATH -am $root`
184192
elif [ "x$WSL_DISTRO_NAME" != "x" ]; then
185193
root=`wslpath -am $root`
186194
fi
@@ -219,26 +227,33 @@ fi
219227
CP=$ANT_HOME/lib/ant.jar
220228
rm -rf $CLASSES; mkdir $CLASSES
221229

222-
if [ "x$CYGPATH" != "x" ] ; then ## CYGPATH may be set in env.cfg
223-
JAVAC_SOURCE_FILE=`cygpath -am $IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java`
224-
JAVAC_SOURCE_PATH=`cygpath -am $IDEA_OUTPUT/src`
225-
JAVAC_CLASSES=`cygpath -am $CLASSES`
226-
JAVAC_CP=`cygpath -am $CP`
230+
# If we have a Windows boot JDK, we need a .exe suffix
231+
if [ -e "$BOOT_JDK/bin/java.exe" ] ; then
232+
JAVAC=javac.exe
233+
else
227234
JAVAC=javac
228-
elif [ "x$WSL_DISTRO_NAME" != "x" ]; then
235+
fi
236+
237+
# If we are on WSL, the boot JDK might be either Windows or Linux,
238+
# and we need to use realpath instead of CYGPATH to make javac work on both.
239+
# We need to handle this case first since CYGPATH might be set on WSL.
240+
if [ "x$WSL_DISTRO_NAME" != "x" ]; then
229241
JAVAC_SOURCE_FILE=`realpath --relative-to=./ $IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java`
230242
JAVAC_SOURCE_PATH=`realpath --relative-to=./ $IDEA_OUTPUT/src`
231243
JAVAC_CLASSES=`realpath --relative-to=./ $CLASSES`
232244
ANT_TEMP=`mktemp -d -p ./`
233245
cp $ANT_HOME/lib/ant.jar $ANT_TEMP/ant.jar
234246
JAVAC_CP=$ANT_TEMP/ant.jar
235-
JAVAC=javac.exe
247+
elif [ "x$CYGPATH" != "x" ] ; then ## CYGPATH may be set in env.cfg
248+
JAVAC_SOURCE_FILE=`$CYGPATH -am $IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java`
249+
JAVAC_SOURCE_PATH=`$CYGPATH -am $IDEA_OUTPUT/src`
250+
JAVAC_CLASSES=`$CYGPATH -am $CLASSES`
251+
JAVAC_CP=`$CYGPATH -am $CP`
236252
else
237253
JAVAC_SOURCE_FILE=$IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java
238254
JAVAC_SOURCE_PATH=$IDEA_OUTPUT/src
239255
JAVAC_CLASSES=$CLASSES
240256
JAVAC_CP=$CP
241-
JAVAC=javac
242257
fi
243258

244259
$BOOT_JDK/bin/$JAVAC -d $JAVAC_CLASSES -sourcepath $JAVAC_SOURCE_PATH -cp $JAVAC_CP $JAVAC_SOURCE_FILE

doc/building.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ <h4 id="advanced-make-control-variables">Advanced Make Control Variables</h4>
506506
</ul>
507507
<h2 id="running-tests">Running Tests</h2>
508508
<p>Most of the JDK tests are using the <a href="http://openjdk.java.net/jtreg">JTReg</a> test framework. Make sure that your configuration knows where to find your installation of JTReg. If this is not picked up automatically, use the <code>--with-jtreg=&lt;path to jtreg home&gt;</code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc.</p>
509-
<p>The <a href="https://wiki.openjdk.java.net/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://ci.adoptopenjdk.net/view/Dependencies/job/jtreg/lastSuccessfulBuild/artifact">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>
509+
<p>The <a href="https://wiki.openjdk.java.net/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>
510510
<p>Building of Hotspot Gtest suite requires the source code of Google Test framework. The top directory, which contains both <code>googletest</code> and <code>googlemock</code> directories, should be specified via <code>--with-gtest</code>. The supported version of Google Test is 1.8.1, whose source code can be obtained:</p>
511511
<ul>
512512
<li>by downloading and unpacking the source bundle from <a href="https://github.com/google/googletest/releases/tag/release-1.8.1">here</a></li>

doc/building.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ containing `lib/jtreg.jar` etc.
848848
849849
The [Adoption Group](https://wiki.openjdk.java.net/display/Adoption) provides
850850
recent builds of jtreg [here](
851-
https://ci.adoptopenjdk.net/view/Dependencies/job/jtreg/lastSuccessfulBuild/artifact).
851+
https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/).
852852
Download the latest `.tar.gz` file, unpack it, and point `--with-jtreg` to the
853853
`jtreg` directory that you just unpacked.
854854

doc/hotspot-style.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ <h3 id="source-files">Source Files</h3>
9494
<li><p>All source files must have a globally unique basename. The build system depends on this uniqueness.</p></li>
9595
<li><p>Do not put non-trivial function implementations in .hpp files. If the implementation depends on other .hpp files, put it in a .cpp or a .inline.hpp file.</p></li>
9696
<li><p>.inline.hpp files should only be included in .cpp or .inline.hpp files.</p></li>
97+
<li><p>All .inline.hpp files should include their corresponding .hpp file as the first include line. Declarations needed by other files should be put in the .hpp file, and not in the .inline.hpp file. This rule exists to resolve problems with circular dependencies between .inline.hpp files.</p></li>
9798
<li><p>All .cpp files include precompiled.hpp as the first include line.</p></li>
9899
<li><p>precompiled.hpp is just a build time optimization, so don't rely on it to resolve include problems.</p></li>
99100
<li><p>Keep the include lines alphabetically sorted.</p></li>

doc/hotspot-style.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ a .inline.hpp file.
138138
* .inline.hpp files should only be included in .cpp or .inline.hpp
139139
files.
140140

141+
* All .inline.hpp files should include their corresponding .hpp file as
142+
the first include line. Declarations needed by other files should be put
143+
in the .hpp file, and not in the .inline.hpp file. This rule exists to
144+
resolve problems with circular dependencies between .inline.hpp files.
145+
141146
* All .cpp files include precompiled.hpp as the first include line.
142147

143148
* precompiled.hpp is just a build time optimization, so don't rely on

make/CompileInterimLangtools.gmk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ TARGETS += $(patsubst %, $(BUILDTOOLS_OUTPUTDIR)/gensrc/%/module-info.java, \
4949
$(INTERIM_LANGTOOLS_MODULES))
5050

5151
$(eval $(call SetupCopyFiles, COPY_PREVIEW_FEATURES, \
52-
FILES := $(TOPDIR)/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java, \
52+
FILES := $(TOPDIR)/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java \
53+
$(TOPDIR)/src/java.base/share/classes/jdk/internal/javac/NoPreview.java, \
5354
DEST := $(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim/jdk/internal/javac/, \
5455
))
5556

make/CreateJmods.gmk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,12 @@ endif
213213

214214
ifeq ($(call isTargetOs, windows), true)
215215
ifeq ($(SHIP_DEBUG_SYMBOLS), )
216-
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.pdb,*.map}'
216+
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.pdb,*.map}'
217217
else
218-
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.map}'
218+
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.map}'
219219
endif
220220
else
221-
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
221+
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
222222
endif
223223

224224
# Create jmods in the support dir and then move them into place to keep the

make/Docs.gmk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,12 @@ define SetupApiDocsGenerationBody
332332
$$(eval $$(call create_overview_file,$1))
333333
$1_OPTIONS += -overview $$($1_OVERVIEW)
334334

335+
# Add summary pages for new/deprecated APIs in recent releases
336+
$1_OPTIONS += --since $(call CommaList, \
337+
$(filter-out $(VERSION_DOCS_API_SINCE), \
338+
$(call sequence, $(VERSION_DOCS_API_SINCE), $(VERSION_FEATURE))))
339+
$1_OPTIONS += --since-label "New API since JDK $(VERSION_DOCS_API_SINCE)"
340+
335341
$$(foreach g, $$($1_GROUPS), \
336342
$$(eval $1_OPTIONS += -group "$$($$g_GROUP_NAME)" "$$($$g_GROUP_MODULES)") \
337343
)

0 commit comments

Comments
 (0)