Skip to content

Commit 0cef30d

Browse files
author
duke
committedNov 27, 2020
Automatic merge of jdk:master into master
2 parents e27fef1 + f2f3ba9 commit 0cef30d

File tree

712 files changed

+82174
-10635
lines changed

Some content is hidden

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

712 files changed

+82174
-10635
lines changed
 

‎.github/workflows/submit.yml

+91-482
Large diffs are not rendered by default.

‎doc/building.md

+31-56
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
## TL;DR (Instructions for the Impatient)
44

55
If you are eager to try out building the JDK, these simple steps works most of
6-
the time. They assume that you have installed Mercurial (and Cygwin if running
6+
the time. They assume that you have installed Git (and Cygwin if running
77
on Windows) and cloned the top-level JDK repository that you want to build.
88

99
1. [Get the complete source code](#getting-the-source-code): \
10-
`hg clone http://hg.openjdk.java.net/jdk/jdk`
10+
`git clone https://git.openjdk.java.net/jdk/`
1111

1212
2. [Run configure](#running-configure): \
1313
`bash configure`
@@ -47,14 +47,14 @@ JDK.
4747

4848
Make sure you are getting the correct version. As of JDK 10, the source is no
4949
longer split into separate repositories so you only need to clone one single
50-
repository. At the [OpenJDK Mercurial server](http://hg.openjdk.java.net/) you
50+
repository. At the [OpenJDK Git site](https://git.openjdk.java.net/) you
5151
can see a list of all available repositories. If you want to build an older version,
52-
e.g. JDK 8, it is recommended that you get the `jdk8u` forest, which contains
53-
incremental updates, instead of the `jdk8` forest, which was frozen at JDK 8 GA.
52+
e.g. JDK 11, it is recommended that you get the `jdk11u` repo, which contains
53+
incremental updates, instead of the `jdk11` repo, which was frozen at JDK 11 GA.
5454

55-
If you are new to Mercurial, a good place to start is the [Mercurial Beginner's
56-
Guide](http://www.mercurial-scm.org/guide). The rest of this document assumes a
57-
working knowledge of Mercurial.
55+
If you are new to Git, a good place to start is the book [Pro
56+
Git](https://git-scm.com/book/en/v2). The rest of this document
57+
assumes a working knowledge of Git.
5858

5959
### Special Considerations
6060

@@ -89,9 +89,21 @@ on where and how to check out the source code.
8989
directory. This is especially important if your user name contains
9090
spaces and/or mixed upper and lower case letters.
9191

92-
* Clone the JDK repository using the Cygwin command line `hg` client
93-
as instructed in this document. That is, do *not* use another Mercurial
94-
client such as TortoiseHg.
92+
* You need to install a git client. You have two choices, Cygwin git or
93+
Git for Windows. Unfortunately there are pros and cons with each choice.
94+
95+
* The Cygwin `git` client has no line ending issues and understands
96+
Cygwin paths (which are used throughout the JDK build system).
97+
However, it does not currently work well with the Skara CLI tooling.
98+
Please see the [Skara wiki on Git clients](
99+
https://wiki.openjdk.java.net/display/SKARA/Skara#Skara-Git) for
100+
up-to-date information about the Skara git client support.
101+
102+
* The [Git for Windows](https://gitforwindows.org) client has issues
103+
with line endings, and do not understand Cygwin paths. It does work
104+
well with the Skara CLI tooling, however. To alleviate the line ending
105+
problems, make sure you set `core.autocrlf` to `false` (this is asked
106+
during installation).
95107

96108
Failure to follow this procedure might result in hard-to-debug build
97109
problems.
@@ -173,7 +185,7 @@ likely be possible to support in a future version but that would require effort
173185
to implement.)
174186

175187
Internally in the build system, all paths are represented as Unix-style paths,
176-
e.g. `/cygdrive/c/hg/jdk9/Makefile` rather than `C:\hg\jdk9\Makefile`. This
188+
e.g. `/cygdrive/c/git/jdk/Makefile` rather than `C:\git\jdk\Makefile`. This
177189
rule also applies to input to the build system, e.g. in arguments to
178190
`configure`. So, use `--with-msvcr-dll=/cygdrive/c/msvcr100.dll` rather than
179191
`--with-msvcr-dll=c:\msvcr100.dll`. For details on this conversion, see the section
@@ -1286,14 +1298,14 @@ ERROR: Build failed for target 'hotspot' in configuration 'linux-x64' (exit code
12861298

12871299
=== Output from failing command(s) repeated here ===
12881300
* For target hotspot_variant-server_libjvm_objs_psMemoryPool.o:
1289-
/localhome/hg/jdk9-sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
1301+
/localhome/git/jdk-sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
12901302
... (rest of output omitted)
12911303

1292-
* All command lines available in /localhome/hg/jdk9-sandbox/build/linux-x64/make-support/failure-logs.
1304+
* All command lines available in /localhome/git/jdk-sandbox/build/linux-x64/make-support/failure-logs.
12931305
=== End of repeated output ===
12941306

12951307
=== Make failed targets repeated here ===
1296-
lib/CompileJvm.gmk:207: recipe for target '/localhome/hg/jdk9-sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
1308+
lib/CompileJvm.gmk:207: recipe for target '/localhome/git/jdk-sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
12971309
make/Main.gmk:263: recipe for target 'hotspot-server-libs' failed
12981310
=== End of repeated output ===
12991311

@@ -1391,7 +1403,7 @@ order. Most issues will be solved at step 1 or 2.
13911403
13921404
1. Make sure your repository is up-to-date
13931405
1394-
Run `hg pull -u` to make sure you have the latest changes.
1406+
Run `git pull origin master` to make sure you have the latest changes.
13951407
13961408
2. Clean build results
13971409
@@ -1416,13 +1428,13 @@ order. Most issues will be solved at step 1 or 2.
14161428
make
14171429
```
14181430
1419-
4. Re-clone the Mercurial repository
1431+
4. Re-clone the Git repository
14201432
1421-
Sometimes the Mercurial repository gets in a state that causes the product
1433+
Sometimes the Git repository gets in a state that causes the product
14221434
to be un-buildable. In such a case, the simplest solution is often the
14231435
"sledgehammer approach": delete the entire repository, and re-clone it.
14241436
If you have local changes, save them first to a different location using
1425-
`hg export`.
1437+
`git format-patch`.
14261438
14271439
### Specific Build Issues
14281440
@@ -1467,33 +1479,6 @@ contact the Adoption Group. See the section on [Contributing to OpenJDK](
14671479
14681480
## Hints and Suggestions for Advanced Users
14691481
1470-
### Setting Up a Repository for Pushing Changes (defpath)
1471-
1472-
To help you prepare a proper push path for a Mercurial repository, there exists
1473-
a useful tool known as [defpath](
1474-
http://openjdk.java.net/projects/code-tools/defpath). It will help you setup a
1475-
proper push path for pushing changes to the JDK.
1476-
1477-
Install the extension by cloning
1478-
`http://hg.openjdk.java.net/code-tools/defpath` and updating your `.hgrc` file.
1479-
Here's one way to do this:
1480-
1481-
```
1482-
cd ~
1483-
mkdir hg-ext
1484-
cd hg-ext
1485-
hg clone http://hg.openjdk.java.net/code-tools/defpath
1486-
cat << EOT >> ~/.hgrc
1487-
[extensions]
1488-
defpath=~/hg-ext/defpath/defpath.py
1489-
EOT
1490-
```
1491-
1492-
You can now setup a proper push path using:
1493-
```
1494-
hg defpath -d -u <your OpenJDK username>
1495-
```
1496-
14971482
### Bash Completion
14981483
14991484
The `configure` and `make` commands tries to play nice with bash command-line
@@ -1634,16 +1619,6 @@ instance, `make java.base JDK_FILTER=javax/crypto` (or, to combine methods,
16341619
`make java.base-java-only JDK_FILTER=javax/crypto`) will limit the compilation
16351620
to files in the `javax.crypto` package.
16361621
1637-
### Learn About Mercurial
1638-
1639-
To become an efficient JDK developer, it is recommended that you invest in
1640-
learning Mercurial properly. Here are some links that can get you started:
1641-
1642-
* [Mercurial for git users](http://www.mercurial-scm.org/wiki/GitConcepts)
1643-
* [The official Mercurial tutorial](http://www.mercurial-scm.org/wiki/Tutorial)
1644-
* [hg init](http://hginit.com/)
1645-
* [Mercurial: The Definitive Guide](http://hgbook.red-bean.com/read/)
1646-
16471622
## Understanding the Build System
16481623
16491624
This section will give you a more technical description on the details of the

0 commit comments

Comments
 (0)
Please sign in to comment.