mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-17 23:09:43 +01:00
Compare commits
95 Commits
jb15-b200
...
lanai-sync
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0de241433d | ||
|
|
fd95090fa2 | ||
|
|
9cb40a9bc7 | ||
|
|
97c7a63ab6 | ||
|
|
623aa48c4f | ||
|
|
83bbb3941e | ||
|
|
cae4b9cc37 | ||
|
|
9226e84501 | ||
|
|
3da068b282 | ||
|
|
45fea40dbd | ||
|
|
e5d516d182 | ||
|
|
db88ce172a | ||
|
|
4a9a1708b3 | ||
|
|
43bbd51b72 | ||
|
|
c02799eede | ||
|
|
6ff6db02e7 | ||
|
|
032aeb34e6 | ||
|
|
8b636c6a87 | ||
|
|
26d9a0794c | ||
|
|
7744fb099e | ||
|
|
f66a1f1263 | ||
|
|
bc73e009cc | ||
|
|
ff5966de7f | ||
|
|
6ab1ed5817 | ||
|
|
075e1321e3 | ||
|
|
6a57e1fd9c | ||
|
|
2e6bdc171a | ||
|
|
72cac62f89 | ||
|
|
98743762dd | ||
|
|
f0445c24e8 | ||
|
|
d0b2ad3e82 | ||
|
|
32a1a537f0 | ||
|
|
5199fb702d | ||
|
|
3bd02981db | ||
|
|
8a1132d3a2 | ||
|
|
3174bd2c75 | ||
|
|
6e24ac5e09 | ||
|
|
6d8ae023f2 | ||
|
|
c8002d297a | ||
|
|
3b48643a82 | ||
|
|
07ac868b77 | ||
|
|
a2d1099854 | ||
|
|
96a52e96de | ||
|
|
57e1ab737d | ||
|
|
7bc2660967 | ||
|
|
c4ef423d8e | ||
|
|
269e7e98e6 | ||
|
|
136f957e05 | ||
|
|
364be79d47 | ||
|
|
2ad73d2e67 | ||
|
|
a941e59035 | ||
|
|
c4baadb3c9 | ||
|
|
e2d1e4c804 | ||
|
|
dee4009a97 | ||
|
|
e682c5129a | ||
|
|
cdcb094b65 | ||
|
|
537653bd49 | ||
|
|
4fd7c3c449 | ||
|
|
2ec02181fa | ||
|
|
14e6b1244c | ||
|
|
24bff4e701 | ||
|
|
18b550e872 | ||
|
|
fab846163c | ||
|
|
03aa3101a1 | ||
|
|
c8b91c2d3f | ||
|
|
5b3c412357 | ||
|
|
95b69fe529 | ||
|
|
535fff0dac | ||
|
|
bbfac12c68 | ||
|
|
1768149951 | ||
|
|
49ca894f15 | ||
|
|
0f76adc28d | ||
|
|
cfc96d96f7 | ||
|
|
4921d927e0 | ||
|
|
61aeca21c1 | ||
|
|
fda678bef9 | ||
|
|
aba2c30d1e | ||
|
|
3ecd356574 | ||
|
|
762853fe8f | ||
|
|
f879fa4e34 | ||
|
|
6c8022b1ee | ||
|
|
d691007acc | ||
|
|
9f250e53c8 | ||
|
|
7cba2b956a | ||
|
|
c4ee724176 | ||
|
|
393e924d2d | ||
|
|
fcba1675a7 | ||
|
|
493e7d102a | ||
|
|
54f1e4ec23 | ||
|
|
a59e9ab2ac | ||
|
|
6bd87cb96f | ||
|
|
7a448bc74d | ||
|
|
b5cc29da48 | ||
|
|
d98d18b297 | ||
|
|
1441538b23 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,7 +1,6 @@
|
||||
/build/
|
||||
/dist/
|
||||
/.idea/
|
||||
/.vscode/
|
||||
nbproject/private/
|
||||
/webrev
|
||||
/.src-rev
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
^build/
|
||||
^dist/
|
||||
^.idea/
|
||||
^.vscode/
|
||||
nbproject/private/
|
||||
^webrev
|
||||
^.src-rev$
|
||||
|
||||
12
.hgtags
12
.hgtags
@@ -626,15 +626,3 @@ b2dd4028a6de4e40dda8b76109e4b5c6b294f980 jdk-15+11
|
||||
1d6ceb13e142665ea833fca01c8c8598e0ddd211 jdk-15+14
|
||||
bc54620a3848c26cff9766e5e2a6e5ddab98ed18 jdk-14-ga
|
||||
82b7c62cf4cc56828a8fb724f57087967232a2a7 jdk-15+15
|
||||
5c7ec21f5d13f6eb5cd32288c69b8be2f9cac256 jdk-15+16
|
||||
dd5198db2e5b1ebcafe065d987c03ba9fcb50fc3 jdk-15+17
|
||||
44aef192b488a48cce12422394691a6b1d16b98e jdk-15+18
|
||||
7cc27caabe6e342151e8baf549beb07a9c755ec2 jdk-15+19
|
||||
46bca5e5e6fb26efd07245d26fe96a9c3260f51e jdk-15+20
|
||||
12b55fad80f30d24b1f8fdb3b947ea6465ef9518 jdk-15+21
|
||||
7223c6d610343fd8323af9d07d501e01fa1a7696 jdk-15+22
|
||||
f143729ca00ec14a98ea5c7f73acba88da97746e jdk-15+23
|
||||
497fd9f9129c4928fd5a876dd55e0daf6298b511 jdk-15+24
|
||||
58833044988772ca06c97ab2f142474a8627af80 jdk-15+25
|
||||
58833044988772ca06c97ab2f142474a8627af80 jdk-15+25
|
||||
90b266a84c06f1b3dc0ed8767856793e8c1c357e jdk-15+25
|
||||
|
||||
38
.jcheck/conf
38
.jcheck/conf
@@ -1,2 +1,36 @@
|
||||
project=jdk
|
||||
bugids=dup
|
||||
;
|
||||
; Copyright (c) 2020, 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.
|
||||
;
|
||||
; 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.
|
||||
;
|
||||
|
||||
[general]
|
||||
project=lanai
|
||||
jbs=JDK
|
||||
|
||||
[checks]
|
||||
error=author,whitespace,executable
|
||||
|
||||
[census]
|
||||
version=0
|
||||
domain=openjdk.org
|
||||
|
||||
[checks "whitespace"]
|
||||
files=.*\.java$|.*\.c$|.*\.h$|.*\.cpp$|.*\.hpp$
|
||||
|
||||
10
bin/idea.sh
10
bin/idea.sh
@@ -74,7 +74,7 @@ if [ "x$TOPLEVEL_DIR" = "x" ] ; then
|
||||
fi
|
||||
|
||||
MAKE_DIR="$SCRIPT_DIR/../make"
|
||||
IDEA_MAKE="$MAKE_DIR/ide/idea/jdk"
|
||||
IDEA_MAKE="$MAKE_DIR/idea"
|
||||
IDEA_TEMPLATE="$IDEA_MAKE/template"
|
||||
|
||||
cp -r "$IDEA_TEMPLATE"/* "$IDEA_OUTPUT"
|
||||
@@ -197,15 +197,13 @@ CP=$ANT_HOME/lib/ant.jar
|
||||
rm -rf $CLASSES; mkdir $CLASSES
|
||||
|
||||
if [ "x$CYGPATH" = "x" ] ; then ## CYGPATH may be set in env.cfg
|
||||
JAVAC_SOURCE_FILE=$IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java
|
||||
JAVAC_SOURCE_PATH=$IDEA_OUTPUT/src
|
||||
JAVAC_SOURCE_FILE=$IDEA_OUTPUT/src/idea/JdkIdeaAntLogger.java
|
||||
JAVAC_CLASSES=$CLASSES
|
||||
JAVAC_CP=$CP
|
||||
else
|
||||
JAVAC_SOURCE_FILE=`cygpath -am $IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java`
|
||||
JAVAC_SOURCE_PATH=`cygpath -am $IDEA_OUTPUT/src`
|
||||
JAVAC_SOURCE_FILE=`cygpath -am $IDEA_OUTPUT/src/idea/JdkIdeaAntLogger.java`
|
||||
JAVAC_CLASSES=`cygpath -am $CLASSES`
|
||||
JAVAC_CP=`cygpath -am $CP`
|
||||
fi
|
||||
|
||||
$BOOT_JDK/bin/javac -d $JAVAC_CLASSES -sourcepath $JAVAC_SOURCE_PATH -cp $JAVAC_CP $JAVAC_SOURCE_FILE
|
||||
$BOOT_JDK/bin/javac -d $JAVAC_CLASSES -cp $JAVAC_CP $JAVAC_SOURCE_FILE
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2017, 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
|
||||
@@ -58,6 +58,7 @@ src/jdk.compiler : jdk/src/jdk.compiler langtools/src/jdk.compiler
|
||||
src/jdk.crypto.cryptoki : jdk/src/jdk.crypto.cryptoki
|
||||
src/jdk.crypto.ec : jdk/src/jdk.crypto.ec
|
||||
src/jdk.crypto.mscapi : jdk/src/jdk.crypto.mscapi
|
||||
src/jdk.crypto.ucrypto : jdk/src/jdk.crypto.ucrypto
|
||||
src/jdk.dynalink : nashorn/src/jdk.dynalink
|
||||
src/jdk.editpad : jdk/src/jdk.editpad
|
||||
src/jdk.hotspot.agent : hotspot/src/jdk.hotspot.agent
|
||||
@@ -87,6 +88,7 @@ src/jdk.naming.dns : jdk/src/jdk.naming.dns
|
||||
src/jdk.naming.rmi : jdk/src/jdk.naming.rmi
|
||||
src/jdk.net : jdk/src/jdk.net
|
||||
src/jdk.pack : jdk/src/jdk.pack
|
||||
src/jdk.rmic : corba/src/jdk.rmic jdk/src/jdk.rmic
|
||||
src/jdk.scripting.nashorn : nashorn/src/jdk.scripting.nashorn
|
||||
src/jdk.scripting.nashorn.shell : nashorn/src/jdk.scripting.nashorn.shell
|
||||
src/jdk.sctp : jdk/src/jdk.sctp
|
||||
@@ -100,11 +102,13 @@ src/jdk.zipfs : jdk/src/jdk.zipfs
|
||||
src/langtools/sample : langtools/src/sample
|
||||
src/linux : jdk/src/linux
|
||||
src/sample : jdk/src/sample
|
||||
src/solaris : jdk/src/solaris
|
||||
src/hotspot/share : hotspot/src/share/vm
|
||||
src/hotspot/cpu/aarch64 : hotspot/src/cpu/aarch64/vm
|
||||
src/hotspot/cpu/arm : hotspot/src/cpu/arm/vm
|
||||
src/hotspot/cpu/ppc : hotspot/src/cpu/ppc/vm
|
||||
src/hotspot/cpu/s390 : hotspot/src/cpu/s390/vm
|
||||
src/hotspot/cpu/sparc : hotspot/src/cpu/sparc/vm
|
||||
src/hotspot/cpu/x86 : hotspot/src/cpu/x86/vm
|
||||
src/hotspot/cpu/zero : hotspot/src/cpu/zero/vm
|
||||
src/hotspot/os/aix : hotspot/src/os/aix/vm
|
||||
@@ -112,6 +116,7 @@ src/hotspot/os/bsd : hotspot/src/os/bsd/vm
|
||||
src/hotspot/os/linux : hotspot/src/os/linux/vm
|
||||
src/hotspot/os/posix/dtrace : hotspot/src/os/posix/dtrace
|
||||
src/hotspot/os/posix : hotspot/src/os/posix/vm
|
||||
src/hotspot/os/solaris : hotspot/src/os/solaris/vm
|
||||
src/hotspot/os/windows : hotspot/src/os/windows/vm
|
||||
src/hotspot/os_cpu/aix_ppc : hotspot/src/os_cpu/aix_ppc/vm
|
||||
src/hotspot/os_cpu/bsd_x86 : hotspot/src/os_cpu/bsd_x86/vm
|
||||
@@ -120,8 +125,11 @@ src/hotspot/os_cpu/linux_aarch64 : hotspot/src/os_cpu/linux_aarch64/vm
|
||||
src/hotspot/os_cpu/linux_arm : hotspot/src/os_cpu/linux_arm/vm
|
||||
src/hotspot/os_cpu/linux_ppc : hotspot/src/os_cpu/linux_ppc/vm
|
||||
src/hotspot/os_cpu/linux_s390 : hotspot/src/os_cpu/linux_s390/vm
|
||||
src/hotspot/os_cpu/linux_sparc : hotspot/src/os_cpu/linux_sparc/vm
|
||||
src/hotspot/os_cpu/linux_x86 : hotspot/src/os_cpu/linux_x86/vm
|
||||
src/hotspot/os_cpu/linux_zero : hotspot/src/os_cpu/linux_zero/vm
|
||||
src/hotspot/os_cpu/solaris_sparc : hotspot/src/os_cpu/solaris_sparc/vm
|
||||
src/hotspot/os_cpu/solaris_x86 : hotspot/src/os_cpu/solaris_x86/vm
|
||||
src/hotspot/os_cpu/windows_x86 : hotspot/src/os_cpu/windows_x86/vm
|
||||
src/hotspot : hotspot/src
|
||||
src/utils/IdealGraphVisualizer : hotspot/src/share/tools/IdealGraphVisualizer
|
||||
@@ -132,6 +140,7 @@ src/utils/src/build : jdk/make/non-build-utils/src/build
|
||||
make/BuildNashorn.gmk : nashorn/make/BuildNashorn.gmk
|
||||
make/CompileDemos.gmk : jdk/make/CompileDemos.gmk
|
||||
make/CompileInterimLangtools.gmk : langtools/make/CompileInterim.gmk
|
||||
make/CompileInterimRmic.gmk : jdk/make/CompileInterimRmic.gmk
|
||||
make/CompileModuleTools.gmk : jdk/make/CompileModuleTools.gmk
|
||||
make/CompileToolsHotspot.gmk : hotspot/make/CompileTools.gmk
|
||||
make/CompileToolsJdk.gmk : jdk/make/CompileTools.gmk
|
||||
@@ -171,6 +180,7 @@ make/mapfiles/libjvm_dtrace : hotspot/make/mapfiles/libjvm_dtrace
|
||||
make/mapfiles/libsaproc : hotspot/make/mapfiles/libsaproc
|
||||
make/nashorn : nashorn/make
|
||||
make/nb_native : common/nb_native
|
||||
make/rmic : jdk/make/rmic
|
||||
make/scripts/addNotices.sh : jdk/make/scripts/addNotices.sh
|
||||
make/scripts/compare.sh : common/bin/compare.sh
|
||||
make/scripts/compare_exceptions.sh.incl : common/bin/compare_exceptions.sh.incl
|
||||
|
||||
@@ -30,11 +30,13 @@
|
||||
</ul></li>
|
||||
<li><a href="#build-hardware-requirements">Build Hardware Requirements</a><ul>
|
||||
<li><a href="#building-on-x86">Building on x86</a></li>
|
||||
<li><a href="#building-on-sparc">Building on sparc</a></li>
|
||||
<li><a href="#building-on-aarch64">Building on aarch64</a></li>
|
||||
<li><a href="#building-on-32-bit-arm">Building on 32-bit arm</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#operating-system-requirements">Operating System Requirements</a><ul>
|
||||
<li><a href="#windows">Windows</a></li>
|
||||
<li><a href="#solaris">Solaris</a></li>
|
||||
<li><a href="#macos">macOS</a></li>
|
||||
<li><a href="#linux">Linux</a></li>
|
||||
<li><a href="#aix">AIX</a></li>
|
||||
@@ -43,6 +45,7 @@
|
||||
<li><a href="#gcc">gcc</a></li>
|
||||
<li><a href="#clang">clang</a></li>
|
||||
<li><a href="#apple-xcode">Apple Xcode</a></li>
|
||||
<li><a href="#oracle-solaris-studio">Oracle Solaris Studio</a></li>
|
||||
<li><a href="#microsoft-visual-studio">Microsoft Visual Studio</a></li>
|
||||
<li><a href="#ibm-xl-cc">IBM XL C/C++</a></li>
|
||||
</ul></li>
|
||||
@@ -154,15 +157,18 @@
|
||||
<p>The JDK is a massive project, and require machines ranging from decent to powerful to be able to build in a reasonable amount of time, or to be able to complete a build at all.</p>
|
||||
<p>We <em>strongly</em> recommend usage of an SSD disk for the build, since disk speed is one of the limiting factors for build performance.</p>
|
||||
<h3 id="building-on-x86">Building on x86</h3>
|
||||
<p>At a minimum, a machine with 2-4 cores is advisable, as well as 2-4 GB of RAM. (The more cores to use, the more memory you need.) At least 6 GB of free disk space is required.</p>
|
||||
<p>At a minimum, a machine with 2-4 cores is advisable, as well as 2-4 GB of RAM. (The more cores to use, the more memory you need.) At least 6 GB of free disk space is required (8 GB minimum for building on Solaris).</p>
|
||||
<p>Even for 32-bit builds, it is recommended to use a 64-bit build machine, and instead create a 32-bit target using <code>--with-target-bits=32</code>.</p>
|
||||
<h3 id="building-on-sparc">Building on sparc</h3>
|
||||
<p>At a minimum, a machine with 4 cores is advisable, as well as 4 GB of RAM. (The more cores to use, the more memory you need.) At least 8 GB of free disk space is required.</p>
|
||||
<p>Note: The sparc port is deprecated.</p>
|
||||
<h3 id="building-on-aarch64">Building on aarch64</h3>
|
||||
<p>At a minimum, a machine with 8 cores is advisable, as well as 8 GB of RAM. (The more cores to use, the more memory you need.) At least 6 GB of free disk space is required.</p>
|
||||
<p>If you do not have access to sufficiently powerful hardware, it is also possible to use <a href="#cross-compiling">cross-compiling</a>.</p>
|
||||
<h3 id="building-on-32-bit-arm">Building on 32-bit arm</h3>
|
||||
<p>This is not recommended. Instead, see the section on <a href="#cross-compiling">Cross-compiling</a>.</p>
|
||||
<h2 id="operating-system-requirements">Operating System Requirements</h2>
|
||||
<p>The mainline JDK project supports Linux, macOS, AIX and Windows. Support for other operating system, e.g. BSD, exists in separate "port" projects.</p>
|
||||
<p>The mainline JDK project supports Linux, Solaris, macOS, AIX and Windows. Support for other operating system, e.g. BSD, exists in separate "port" projects.</p>
|
||||
<p>In general, the JDK can be built on a wide range of versions of these operating systems, but the further you deviate from what is tested on a daily basis, the more likely you are to run into problems.</p>
|
||||
<p>This table lists the OS versions used by Oracle when building the JDK. Such information is always subject to change, but this table is up to date at the time of writing.</p>
|
||||
<table>
|
||||
@@ -178,16 +184,20 @@
|
||||
<td style="text-align: left;">Oracle Enterprise Linux 6.4 / 7.6</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">Solaris</td>
|
||||
<td style="text-align: left;">Solaris 11.3 SRU 20</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">macOS</td>
|
||||
<td style="text-align: left;">Mac OS X 10.13 (High Sierra)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">Windows</td>
|
||||
<td style="text-align: left;">Windows Server 2012 R2</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>The double version numbers for Linux are due to the hybrid model used at Oracle, where header files and external libraries from an older version are used when building on a more modern version of the OS.</p>
|
||||
<p>The double version numbers for Linux and Solaris are due to the hybrid model used at Oracle, where header files and external libraries from an older version are used when building on a more modern version of the OS.</p>
|
||||
<p>The Build Group has a wiki page with <a href="https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms">Supported Build Platforms</a>. From time to time, this is updated by contributors to list successes or failures of building on different platforms.</p>
|
||||
<h3 id="windows">Windows</h3>
|
||||
<p>Windows XP is not a supported platform, but all newer Windows should be able to build the JDK.</p>
|
||||
@@ -213,6 +223,10 @@
|
||||
<p>It's possible to build both Windows and Linux binaries from WSL. To build Windows binaries, you must use a Windows boot JDK (located in a Windows-accessible directory). To build Linux binaries, you must use a Linux boot JDK. The default behavior is to build for Windows. To build for Linux, pass <code>--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu</code> to <code>configure</code>.</p>
|
||||
<p>If building Windows binaries, the source code must be located in a Windows- accessible directory. This is because Windows executables (such as Visual Studio and the boot JDK) must be able to access the source code. Also, the drive where the source is stored must be mounted as case-insensitive by changing either /etc/fstab or /etc/wsl.conf in WSL. Individual directories may be corrected using the fsutil tool in case the source was cloned before changing the mount options.</p>
|
||||
<p>Note that while it's possible to build on WSL, testing is still not fully supported.</p>
|
||||
<h3 id="solaris">Solaris</h3>
|
||||
<p>See <code>make/devkit/solaris11.1-package-list.txt</code> for a list of recommended packages to install when building on Solaris. The versions specified in this list is the versions used by the daily builds at Oracle, and is likely to work properly.</p>
|
||||
<p>Older versions of Solaris shipped a broken version of <code>objcopy</code>. At least version 2.21.1 is needed, which is provided by Solaris 11 Update 1. Objcopy is needed if you want to have external debug symbols. Please make sure you are using at least version 2.21.1 of objcopy, or that you disable external debug symbols.</p>
|
||||
<p>Note: The Solaris port is deprecated.</p>
|
||||
<h3 id="macos">macOS</h3>
|
||||
<p>Apple is using a quite aggressive scheme of pushing OS updates, and coupling these updates with required updates of Xcode. Unfortunately, this makes it difficult for a project such as the JDK to keep pace with a continuously updated machine running macOS. See the section on <a href="#apple-xcode">Apple Xcode</a> on some strategies to deal with this.</p>
|
||||
<p>It is recommended that you use at least Mac OS X 10.13 (High Sierra). At the time of writing, the JDK has been successfully compiled on macOS 10.12 (Sierra).</p>
|
||||
@@ -245,10 +259,14 @@
|
||||
<td style="text-align: left;">Apple Xcode (using clang)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">Solaris</td>
|
||||
<td style="text-align: left;">Oracle Solaris Studio</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">AIX</td>
|
||||
<td style="text-align: left;">IBM XL C/C++</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">Windows</td>
|
||||
<td style="text-align: left;">Microsoft Visual Studio</td>
|
||||
</tr>
|
||||
@@ -265,22 +283,26 @@
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">Linux</td>
|
||||
<td style="text-align: left;">gcc 9.2.0</td>
|
||||
<td style="text-align: left;">gcc 8.3.0</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">macOS</td>
|
||||
<td style="text-align: left;">Apple Xcode 10.1 (using clang 10.0.0)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">Solaris</td>
|
||||
<td style="text-align: left;">Oracle Solaris Studio 12.6 (with compiler version 5.15)</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">Windows</td>
|
||||
<td style="text-align: left;">Microsoft Visual Studio 2019 update 16.5.3</td>
|
||||
<td style="text-align: left;">Microsoft Visual Studio 2017 update 15.9.16</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>All compilers are expected to be able to compile to the C99 language standard, as some C99 features are used in the source code. Microsoft Visual Studio doesn't fully support C99 so in practice shared code is limited to using C99 features that it does support.</p>
|
||||
<h3 id="gcc">gcc</h3>
|
||||
<p>The minimum accepted version of gcc is 5.0. Older versions will generate a warning by <code>configure</code> and are unlikely to work.</p>
|
||||
<p>The JDK is currently known to be able to compile with at least version 9.2 of gcc.</p>
|
||||
<p>The JDK is currently known to be able to compile with at least version 8.3 of gcc.</p>
|
||||
<p>In general, any version between these two should be usable.</p>
|
||||
<h3 id="clang">clang</h3>
|
||||
<p>The minimum accepted version of clang is 3.2. Older versions will not be accepted by <code>configure</code>.</p>
|
||||
@@ -291,6 +313,64 @@
|
||||
<pre><code>xcode-select --install</code></pre>
|
||||
<p>It is advisable to keep an older version of Xcode for building the JDK when updating Xcode. This <a href="http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html">blog page</a> has good suggestions on managing multiple Xcode versions. To use a specific version of Xcode, use <code>xcode-select -s</code> before running <code>configure</code>, or use <code>--with-toolchain-path</code> to point to the version of Xcode to use, e.g. <code>configure --with-toolchain-path=/Applications/Xcode8.app/Contents/Developer/usr/bin</code></p>
|
||||
<p>If you have recently (inadvertently) updated your OS and/or Xcode version, and the JDK can no longer be built, please see the section on <a href="#problems-with-the-build-environment">Problems with the Build Environment</a>, and <a href="#getting-help">Getting Help</a> to find out if there are any recent, non-merged patches available for this update.</p>
|
||||
<h3 id="oracle-solaris-studio">Oracle Solaris Studio</h3>
|
||||
<p>The minimum accepted version of the Solaris Studio compilers is 5.13 (corresponding to Solaris Studio 12.4). Older versions will not be accepted by configure.</p>
|
||||
<p>The Solaris Studio installation should contain at least these packages:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th style="text-align: left;">Package</th>
|
||||
<th style="text-align: left;">Version</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">developer/solarisstudio-124/backend</td>
|
||||
<td style="text-align: left;">12.4-1.0.6.0</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">developer/solarisstudio-124/c++</td>
|
||||
<td style="text-align: left;">12.4-1.0.10.0</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">developer/solarisstudio-124/cc</td>
|
||||
<td style="text-align: left;">12.4-1.0.4.0</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">developer/solarisstudio-124/library/c++-libs</td>
|
||||
<td style="text-align: left;">12.4-1.0.10.0</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">developer/solarisstudio-124/library/math-libs</td>
|
||||
<td style="text-align: left;">12.4-1.0.0.1</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">developer/solarisstudio-124/library/studio-gccrt</td>
|
||||
<td style="text-align: left;">12.4-1.0.0.1</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">developer/solarisstudio-124/studio-common</td>
|
||||
<td style="text-align: left;">12.4-1.0.0.1</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">developer/solarisstudio-124/studio-ja</td>
|
||||
<td style="text-align: left;">12.4-1.0.0.1</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">developer/solarisstudio-124/studio-legal</td>
|
||||
<td style="text-align: left;">12.4-1.0.0.1</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">developer/solarisstudio-124/studio-zhCN</td>
|
||||
<td style="text-align: left;">12.4-1.0.0.1</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Compiling with Solaris Studio can sometimes be finicky. This is the exact version used by Oracle, which worked correctly at the time of writing:</p>
|
||||
<pre><code>$ cc -V
|
||||
cc: Sun C 5.13 SunOS_i386 2014/10/20
|
||||
$ CC -V
|
||||
CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
|
||||
<h3 id="microsoft-visual-studio">Microsoft Visual Studio</h3>
|
||||
<p>The minimum accepted version of Visual Studio is 2010. Older versions will not be accepted by <code>configure</code>. The maximum accepted version of Visual Studio is 2019. Versions older than 2017 are unlikely to continue working for long.</p>
|
||||
<p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2015</code>.</p>
|
||||
@@ -314,6 +394,7 @@
|
||||
<ul>
|
||||
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libfreetype6-dev</code>.</li>
|
||||
<li>To install on an rpm-based Linux, try running <code>sudo yum install freetype-devel</code>.</li>
|
||||
<li>To install on Solaris, try running <code>pkg install system/library/freetype-2</code>.</li>
|
||||
</ul>
|
||||
<p>Use <code>--with-freetype-include=<path></code> and <code>--with-freetype-lib=<path></code> if <code>configure</code> does not automatically locate the platform FreeType files.</p>
|
||||
<h3 id="cups">CUPS</h3>
|
||||
@@ -321,13 +402,15 @@
|
||||
<ul>
|
||||
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libcups2-dev</code>.</li>
|
||||
<li>To install on an rpm-based Linux, try running <code>sudo yum install cups-devel</code>.</li>
|
||||
<li>To install on Solaris, try running <code>pkg install print/cups</code>.</li>
|
||||
</ul>
|
||||
<p>Use <code>--with-cups=<path></code> if <code>configure</code> does not properly locate your CUPS files.</p>
|
||||
<h3 id="x11">X11</h3>
|
||||
<p>Certain <a href="http://www.x.org/">X11</a> libraries and include files are required on Linux.</p>
|
||||
<p>Certain <a href="http://www.x.org/">X11</a> libraries and include files are required on Linux and Solaris.</p>
|
||||
<ul>
|
||||
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev</code>.</li>
|
||||
<li>To install on an rpm-based Linux, try running <code>sudo yum install libXtst-devel libXt-devel libXrender-devel libXrandr-devel libXi-devel</code>.</li>
|
||||
<li>To install on Solaris, try running <code>pkg install x11/header/x11-protocols x11/library/libice x11/library/libpthread-stubs x11/library/libsm x11/library/libx11 x11/library/libxau x11/library/libxcb x11/library/libxdmcp x11/library/libxevie x11/library/libxext x11/library/libxrender x11/library/libxrandr x11/library/libxscrnsaver x11/library/libxtst x11/library/toolkit/libxt</code>.</li>
|
||||
</ul>
|
||||
<p>Use <code>--with-x=<path></code> if <code>configure</code> does not properly locate your X11 files.</p>
|
||||
<h3 id="alsa">ALSA</h3>
|
||||
@@ -360,6 +443,7 @@
|
||||
<p>At least version 3.81 of GNU Make must be used. For distributions supporting GNU Make 4.0 or above, we strongly recommend it. GNU Make 4.0 contains useful functionality to handle parallel building (supported by <code>--with-output-sync</code>) and speed and stability improvements.</p>
|
||||
<p>Note that <code>configure</code> locates and verifies a properly functioning version of <code>make</code> and stores the path to this <code>make</code> binary in the configuration. If you start a build using <code>make</code> on the command line, you will be using the version of make found first in your <code>PATH</code>, and not necessarily the one stored in the configuration. This initial make will be used as "bootstrap make", and in a second stage, the make located by <code>configure</code> will be called. Normally, this will present no issues, but if you have a very old <code>make</code>, or a non-GNU Make <code>make</code> in your path, this might cause issues.</p>
|
||||
<p>If you want to override the default make found by <code>configure</code>, use the <code>MAKE</code> configure variable, e.g. <code>configure MAKE=/opt/gnu/make</code>.</p>
|
||||
<p>On Solaris, it is common to call the GNU version of make by using <code>gmake</code>.</p>
|
||||
<h3 id="gnu-bash">GNU Bash</h3>
|
||||
<p>The JDK requires <a href="http://www.gnu.org/software/bash">GNU Bash</a>. No other shells are supported.</p>
|
||||
<p>At least version 3.2 of GNU Bash must be used.</p>
|
||||
@@ -452,7 +536,7 @@
|
||||
<li><code>dist-clean</code> - Remove all files, including configuration</li>
|
||||
</ul>
|
||||
<p>Run <code>make help</code> to get an up-to-date list of important make targets and make control variables.</p>
|
||||
<p>It is possible to build just a single module, a single phase, or a single phase of a single module, by creating make targets according to these followin patterns. A phase can be either of <code>gensrc</code>, <code>gendata</code>, <code>copy</code>, <code>java</code>, <code>launchers</code>, or <code>libs</code>. See <a href="#using-fine-grained-make-targets">Using Fine-Grained Make Targets</a> for more details about this functionality.</p>
|
||||
<p>It is possible to build just a single module, a single phase, or a single phase of a single module, by creating make targets according to these followin patterns. A phase can be either of <code>gensrc</code>, <code>gendata</code>, <code>copy</code>, <code>java</code>, <code>launchers</code>, <code>libs</code> or <code>rmic</code>. See <a href="#using-fine-grained-make-targets">Using Fine-Grained Make Targets</a> for more details about this functionality.</p>
|
||||
<ul>
|
||||
<li><code><phase></code> - Build the specified phase and everything it depends on</li>
|
||||
<li><code><module></code> - Build the specified module and everything it depends on</li>
|
||||
@@ -494,12 +578,7 @@
|
||||
</ul>
|
||||
<h2 id="running-tests">Running Tests</h2>
|
||||
<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=<path to jtreg home></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>
|
||||
<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>
|
||||
<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>
|
||||
<ul>
|
||||
<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>
|
||||
<li>or by checking out <code>release-1.8.1</code> tag of <code>googletest</code> project: <code>git clone -b release-1.8.1 https://github.com/google/googletest</code></li>
|
||||
</ul>
|
||||
<p>The <a href="https://wiki.openjdk.java.net/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://adopt-openjdk.ci.cloudbees.com/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>
|
||||
<p>To execute the most basic tests (tier 1), use:</p>
|
||||
<pre><code>make run-test-tier1</code></pre>
|
||||
<p>For more details on how to run tests, please see the <a href="testing.html">Testing the JDK</a> document.</p>
|
||||
@@ -786,6 +865,9 @@ Clock skew detected. Your build may be incomplete.</code></pre>
|
||||
<p>then the clock on your build machine is out of sync with the timestamps on the source files. Other errors, apparently unrelated but in fact caused by the clock skew, can occur along with the clock skew warnings. These secondary errors may tend to obscure the fact that the true root cause of the problem is an out-of-sync clock.</p>
|
||||
<p>If you see these warnings, reset the clock on the build machine, run <code>make clean</code> and restart the build.</p>
|
||||
<h4 id="out-of-memory-errors">Out of Memory Errors</h4>
|
||||
<p>On Solaris, you might get an error message like this:</p>
|
||||
<pre><code>Trouble writing out table to disk</code></pre>
|
||||
<p>To solve this, increase the amount of swap space on your build machine.</p>
|
||||
<p>On Windows, you might get error messages like this:</p>
|
||||
<pre><code>fatal error - couldn't allocate heap
|
||||
cannot create ... Permission denied
|
||||
@@ -837,7 +919,7 @@ sudo mv /tmp/configure /usr/local/bin</code></pre>
|
||||
<p>If you are prepared to take some risk of an incorrect build, and know enough of the system to understand how things build and interact, you can speed up the build process considerably by instructing make to only build a portion of the product.</p>
|
||||
<h4 id="building-individual-modules">Building Individual Modules</h4>
|
||||
<p>The safe way to use fine-grained make targets is to use the module specific make targets. All source code in the JDK is organized so it belongs to a module, e.g. <code>java.base</code> or <code>jdk.jdwp.agent</code>. You can build only a specific module, by giving it as make target: <code>make jdk.jdwp.agent</code>. If the specified module depends on other modules (e.g. <code>java.base</code>), those modules will be built first.</p>
|
||||
<p>You can also specify a set of modules, just as you can always specify a set of make targets: <code>make jdk.crypto.cryptoki jdk.crypto.ec jdk.crypto.mscapi</code></p>
|
||||
<p>You can also specify a set of modules, just as you can always specify a set of make targets: <code>make jdk.crypto.cryptoki jdk.crypto.ec jdk.crypto.mscapi jdk.crypto.ucrypto</code></p>
|
||||
<h4 id="building-individual-module-phases">Building Individual Module Phases</h4>
|
||||
<p>The build process for each module is divided into separate phases. Not all modules need all phases. Which are needed depends on what kind of source code and other artifact the module consists of. The phases are:</p>
|
||||
<ul>
|
||||
@@ -847,6 +929,7 @@ sudo mv /tmp/configure /usr/local/bin</code></pre>
|
||||
<li><code>java</code> (Compile Java code)</li>
|
||||
<li><code>launchers</code> (Compile native executables)</li>
|
||||
<li><code>libs</code> (Compile native libraries)</li>
|
||||
<li><code>rmic</code> (Run the <code>rmic</code> tool)</li>
|
||||
</ul>
|
||||
<p>You can build only a single phase for a module by using the notation <code>$MODULE-$PHASE</code>. For instance, to build the <code>gensrc</code> phase for <code>java.base</code>, use <code>make java.base-gensrc</code>.</p>
|
||||
<p>Note that some phases may depend on others, e.g. <code>java</code> depends on <code>gensrc</code> (if present). Make will build all needed prerequisites before building the requested phase.</p>
|
||||
|
||||
102
doc/building.md
102
doc/building.md
@@ -109,11 +109,19 @@ one of the limiting factors for build performance.
|
||||
|
||||
At a minimum, a machine with 2-4 cores is advisable, as well as 2-4 GB of RAM.
|
||||
(The more cores to use, the more memory you need.) At least 6 GB of free disk
|
||||
space is required.
|
||||
space is required (8 GB minimum for building on Solaris).
|
||||
|
||||
Even for 32-bit builds, it is recommended to use a 64-bit build machine, and
|
||||
instead create a 32-bit target using `--with-target-bits=32`.
|
||||
|
||||
### Building on sparc
|
||||
|
||||
At a minimum, a machine with 4 cores is advisable, as well as 4 GB of RAM. (The
|
||||
more cores to use, the more memory you need.) At least 8 GB of free disk space
|
||||
is required.
|
||||
|
||||
Note: The sparc port is deprecated.
|
||||
|
||||
### Building on aarch64
|
||||
|
||||
At a minimum, a machine with 8 cores is advisable, as well as 8 GB of RAM.
|
||||
@@ -130,7 +138,7 @@ This is not recommended. Instead, see the section on [Cross-compiling](
|
||||
|
||||
## Operating System Requirements
|
||||
|
||||
The mainline JDK project supports Linux, macOS, AIX and Windows.
|
||||
The mainline JDK project supports Linux, Solaris, macOS, AIX and Windows.
|
||||
Support for other operating system, e.g. BSD, exists in separate "port"
|
||||
projects.
|
||||
|
||||
@@ -145,10 +153,11 @@ time of writing.
|
||||
Operating system Vendor/version used
|
||||
----------------- -------------------------------------------------------
|
||||
Linux Oracle Enterprise Linux 6.4 / 7.6
|
||||
Solaris Solaris 11.3 SRU 20
|
||||
macOS Mac OS X 10.13 (High Sierra)
|
||||
Windows Windows Server 2012 R2
|
||||
|
||||
The double version numbers for Linux are due to the hybrid model
|
||||
The double version numbers for Linux and Solaris are due to the hybrid model
|
||||
used at Oracle, where header files and external libraries from an older version
|
||||
are used when building on a more modern version of the OS.
|
||||
|
||||
@@ -238,6 +247,21 @@ options.
|
||||
Note that while it's possible to build on WSL, testing is still not fully
|
||||
supported.
|
||||
|
||||
### Solaris
|
||||
|
||||
See `make/devkit/solaris11.1-package-list.txt` for a list of recommended
|
||||
packages to install when building on Solaris. The versions specified in this
|
||||
list is the versions used by the daily builds at Oracle, and is likely to work
|
||||
properly.
|
||||
|
||||
Older versions of Solaris shipped a broken version of `objcopy`. At least
|
||||
version 2.21.1 is needed, which is provided by Solaris 11 Update 1. Objcopy is
|
||||
needed if you want to have external debug symbols. Please make sure you are
|
||||
using at least version 2.21.1 of objcopy, or that you disable external debug
|
||||
symbols.
|
||||
|
||||
Note: The Solaris port is deprecated.
|
||||
|
||||
### macOS
|
||||
|
||||
Apple is using a quite aggressive scheme of pushing OS updates, and coupling
|
||||
@@ -290,6 +314,7 @@ one-to-one correlation between target operating system and toolchain.
|
||||
------------------ -------------------------
|
||||
Linux gcc, clang
|
||||
macOS Apple Xcode (using clang)
|
||||
Solaris Oracle Solaris Studio
|
||||
AIX IBM XL C/C++
|
||||
Windows Microsoft Visual Studio
|
||||
|
||||
@@ -302,9 +327,10 @@ issues.
|
||||
|
||||
Operating system Toolchain version
|
||||
------------------ -------------------------------------------------------
|
||||
Linux gcc 9.2.0
|
||||
Linux gcc 8.3.0
|
||||
macOS Apple Xcode 10.1 (using clang 10.0.0)
|
||||
Windows Microsoft Visual Studio 2019 update 16.5.3
|
||||
Solaris Oracle Solaris Studio 12.6 (with compiler version 5.15)
|
||||
Windows Microsoft Visual Studio 2017 update 15.9.16
|
||||
|
||||
All compilers are expected to be able to compile to the C99 language standard,
|
||||
as some C99 features are used in the source code. Microsoft Visual Studio
|
||||
@@ -316,7 +342,7 @@ features that it does support.
|
||||
The minimum accepted version of gcc is 5.0. Older versions will generate a warning
|
||||
by `configure` and are unlikely to work.
|
||||
|
||||
The JDK is currently known to be able to compile with at least version 9.2 of
|
||||
The JDK is currently known to be able to compile with at least version 8.3 of
|
||||
gcc.
|
||||
|
||||
In general, any version between these two should be usable.
|
||||
@@ -353,6 +379,36 @@ Build Environment](#problems-with-the-build-environment), and [Getting
|
||||
Help](#getting-help) to find out if there are any recent, non-merged patches
|
||||
available for this update.
|
||||
|
||||
### Oracle Solaris Studio
|
||||
|
||||
The minimum accepted version of the Solaris Studio compilers is 5.13
|
||||
(corresponding to Solaris Studio 12.4). Older versions will not be accepted by
|
||||
configure.
|
||||
|
||||
The Solaris Studio installation should contain at least these packages:
|
||||
|
||||
Package Version
|
||||
-------------------------------------------------- -------------
|
||||
developer/solarisstudio-124/backend 12.4-1.0.6.0
|
||||
developer/solarisstudio-124/c++ 12.4-1.0.10.0
|
||||
developer/solarisstudio-124/cc 12.4-1.0.4.0
|
||||
developer/solarisstudio-124/library/c++-libs 12.4-1.0.10.0
|
||||
developer/solarisstudio-124/library/math-libs 12.4-1.0.0.1
|
||||
developer/solarisstudio-124/library/studio-gccrt 12.4-1.0.0.1
|
||||
developer/solarisstudio-124/studio-common 12.4-1.0.0.1
|
||||
developer/solarisstudio-124/studio-ja 12.4-1.0.0.1
|
||||
developer/solarisstudio-124/studio-legal 12.4-1.0.0.1
|
||||
developer/solarisstudio-124/studio-zhCN 12.4-1.0.0.1
|
||||
|
||||
Compiling with Solaris Studio can sometimes be finicky. This is the exact
|
||||
version used by Oracle, which worked correctly at the time of writing:
|
||||
```
|
||||
$ cc -V
|
||||
cc: Sun C 5.13 SunOS_i386 2014/10/20
|
||||
$ CC -V
|
||||
CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30
|
||||
```
|
||||
|
||||
### Microsoft Visual Studio
|
||||
|
||||
The minimum accepted version of Visual Studio is 2010. Older versions will not
|
||||
@@ -438,6 +494,7 @@ rather than bundling the JDK's own copy.
|
||||
libfreetype6-dev`.
|
||||
* To install on an rpm-based Linux, try running `sudo yum install
|
||||
freetype-devel`.
|
||||
* To install on Solaris, try running `pkg install system/library/freetype-2`.
|
||||
|
||||
Use `--with-freetype-include=<path>` and `--with-freetype-lib=<path>`
|
||||
if `configure` does not automatically locate the platform FreeType files.
|
||||
@@ -452,6 +509,7 @@ your operating system.
|
||||
libcups2-dev`.
|
||||
* To install on an rpm-based Linux, try running `sudo yum install
|
||||
cups-devel`.
|
||||
* To install on Solaris, try running `pkg install print/cups`.
|
||||
|
||||
Use `--with-cups=<path>` if `configure` does not properly locate your CUPS
|
||||
files.
|
||||
@@ -459,12 +517,18 @@ files.
|
||||
### X11
|
||||
|
||||
Certain [X11](http://www.x.org/) libraries and include files are required on
|
||||
Linux.
|
||||
Linux and Solaris.
|
||||
|
||||
* To install on an apt-based Linux, try running `sudo apt-get install
|
||||
libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev`.
|
||||
* To install on an rpm-based Linux, try running `sudo yum install
|
||||
libXtst-devel libXt-devel libXrender-devel libXrandr-devel libXi-devel`.
|
||||
* To install on Solaris, try running `pkg install x11/header/x11-protocols
|
||||
x11/library/libice x11/library/libpthread-stubs x11/library/libsm
|
||||
x11/library/libx11 x11/library/libxau x11/library/libxcb
|
||||
x11/library/libxdmcp x11/library/libxevie x11/library/libxext
|
||||
x11/library/libxrender x11/library/libxrandr x11/library/libxscrnsaver
|
||||
x11/library/libxtst x11/library/toolkit/libxt`.
|
||||
|
||||
Use `--with-x=<path>` if `configure` does not properly locate your X11 files.
|
||||
|
||||
@@ -539,6 +603,8 @@ will present no issues, but if you have a very old `make`, or a non-GNU Make
|
||||
If you want to override the default make found by `configure`, use the `MAKE`
|
||||
configure variable, e.g. `configure MAKE=/opt/gnu/make`.
|
||||
|
||||
On Solaris, it is common to call the GNU version of make by using `gmake`.
|
||||
|
||||
### GNU Bash
|
||||
|
||||
The JDK requires [GNU Bash](http://www.gnu.org/software/bash). No other shells
|
||||
@@ -752,7 +818,7 @@ control variables.
|
||||
It is possible to build just a single module, a single phase, or a single phase
|
||||
of a single module, by creating make targets according to these followin
|
||||
patterns. A phase can be either of `gensrc`, `gendata`, `copy`, `java`,
|
||||
`launchers`, or `libs`. See [Using Fine-Grained Make Targets](
|
||||
`launchers`, `libs` or `rmic`. See [Using Fine-Grained Make Targets](
|
||||
#using-fine-grained-make-targets) for more details about this functionality.
|
||||
|
||||
* `<phase>` - Build the specified phase and everything it depends on
|
||||
@@ -825,18 +891,10 @@ containing `lib/jtreg.jar` etc.
|
||||
|
||||
The [Adoption Group](https://wiki.openjdk.java.net/display/Adoption) provides
|
||||
recent builds of jtreg [here](
|
||||
https://ci.adoptopenjdk.net/view/Dependencies/job/jtreg/lastSuccessfulBuild/artifact).
|
||||
https://adopt-openjdk.ci.cloudbees.com/job/jtreg/lastSuccessfulBuild/artifact).
|
||||
Download the latest `.tar.gz` file, unpack it, and point `--with-jtreg` to the
|
||||
`jtreg` directory that you just unpacked.
|
||||
|
||||
Building of Hotspot Gtest suite requires the source code of Google Test framework.
|
||||
The top directory, which contains both `googletest` and `googlemock`
|
||||
directories, should be specified via `--with-gtest`.
|
||||
The supported version of Google Test is 1.8.1, whose source code can be obtained:
|
||||
|
||||
* by downloading and unpacking the source bundle from [here](https://github.com/google/googletest/releases/tag/release-1.8.1)
|
||||
* or by checking out `release-1.8.1` tag of `googletest` project: `git clone -b release-1.8.1 https://github.com/google/googletest`
|
||||
|
||||
To execute the most basic tests (tier 1), use:
|
||||
```
|
||||
make run-test-tier1
|
||||
@@ -1402,6 +1460,12 @@ clean` and restart the build.
|
||||
|
||||
#### Out of Memory Errors
|
||||
|
||||
On Solaris, you might get an error message like this:
|
||||
```
|
||||
Trouble writing out table to disk
|
||||
```
|
||||
To solve this, increase the amount of swap space on your build machine.
|
||||
|
||||
On Windows, you might get error messages like this:
|
||||
```
|
||||
fatal error - couldn't allocate heap
|
||||
@@ -1540,7 +1604,8 @@ module depends on other modules (e.g. `java.base`), those modules will be built
|
||||
first.
|
||||
|
||||
You can also specify a set of modules, just as you can always specify a set of
|
||||
make targets: `make jdk.crypto.cryptoki jdk.crypto.ec jdk.crypto.mscapi`
|
||||
make targets: `make jdk.crypto.cryptoki jdk.crypto.ec jdk.crypto.mscapi
|
||||
jdk.crypto.ucrypto`
|
||||
|
||||
#### Building Individual Module Phases
|
||||
|
||||
@@ -1554,6 +1619,7 @@ and other artifact the module consists of. The phases are:
|
||||
* `java` (Compile Java code)
|
||||
* `launchers` (Compile native executables)
|
||||
* `libs` (Compile native libraries)
|
||||
* `rmic` (Run the `rmic` tool)
|
||||
|
||||
You can build only a single phase for a module by using the notation
|
||||
`$MODULE-$PHASE`. For instance, to build the `gensrc` phase for `java.base`,
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
$ make test-jdk_lang JTREG="JOBS=8"
|
||||
$ make test TEST=jdk_lang
|
||||
$ make test-only TEST="gtest:LogTagSet gtest:LogTagSetDescriptions" GTEST="REPEAT=-1"
|
||||
$ make test TEST="hotspot:hotspot_gc" JTREG="JOBS=1;TIMEOUT_FACTOR=8;JAVA_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"
|
||||
$ make test TEST="hotspot:hotspot_gc" JTREG="JOBS=1;TIMEOUT_FACTOR=8;VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"
|
||||
$ make test TEST="jtreg:test/hotspot:hotspot_gc test/hotspot/jtreg/native_sanity/JniVersion.java"
|
||||
$ make test TEST="micro:java.lang.reflect" MICRO="FORK=1;WARMUP_ITER=2"
|
||||
$ make exploded-test TEST=tier2</code></pre>
|
||||
@@ -106,8 +106,8 @@ TEST FAILURE</code></pre>
|
||||
<h2 id="test-suite-control">Test suite control</h2>
|
||||
<p>It is possible to control various aspects of the test suites using make control variables.</p>
|
||||
<p>These variables use a keyword=value approach to allow multiple values to be set. So, for instance, <code>JTREG="JOBS=1;TIMEOUT_FACTOR=8"</code> will set the JTReg concurrency level to 1 and the timeout factor to 8. This is equivalent to setting <code>JTREG_JOBS=1 JTREG_TIMEOUT_FACTOR=8</code>, but using the keyword format means that the <code>JTREG</code> variable is parsed and verified for correctness, so <code>JTREG="TMIEOUT_FACTOR=8"</code> would give an error, while <code>JTREG_TMIEOUT_FACTOR=8</code> would just pass unnoticed.</p>
|
||||
<p>To separate multiple keyword=value pairs, use <code>;</code> (semicolon). Since the shell normally eats <code>;</code>, the recommended usage is to write the assignment inside qoutes, e.g. <code>JTREG="...;..."</code>. This will also make sure spaces are preserved, as in <code>JTREG="JAVA_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"</code>.</p>
|
||||
<p>(Other ways are possible, e.g. using backslash: <code>JTREG=JOBS=1\;TIMEOUT_FACTOR=8</code>. Also, as a special technique, the string <code>%20</code> will be replaced with space for certain options, e.g. <code>JTREG=JAVA_OPTIONS=-XshowSettings%20-Xlog:gc+ref=debug</code>. This can be useful if you have layers of scripts and have trouble getting proper quoting of command line arguments through.)</p>
|
||||
<p>To separate multiple keyword=value pairs, use <code>;</code> (semicolon). Since the shell normally eats <code>;</code>, the recommended usage is to write the assignment inside qoutes, e.g. <code>JTREG="...;..."</code>. This will also make sure spaces are preserved, as in <code>JTREG="VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"</code>.</p>
|
||||
<p>(Other ways are possible, e.g. using backslash: <code>JTREG=JOBS=1\;TIMEOUT_FACTOR=8</code>. Also, as a special technique, the string <code>%20</code> will be replaced with space for certain options, e.g. <code>JTREG=VM_OPTIONS=-XshowSettings%20-Xlog:gc+ref=debug</code>. This can be useful if you have layers of scripts and have trouble getting proper quoting of command line arguments through.)</p>
|
||||
<p>As far as possible, the names of the keywords have been standardized between test suites.</p>
|
||||
<h3 id="general-keywords-test_opts">General keywords (TEST_OPTS)</h3>
|
||||
<p>Some keywords are valid across different test suites. If you want to run tests from multiple test suites, or just don't want to care which test suite specific control variable to use, then you can use the general TEST_OPTS control variable.</p>
|
||||
@@ -116,16 +116,16 @@ TEST FAILURE</code></pre>
|
||||
<p>Currently only applies to JTReg.</p>
|
||||
<h4 id="timeout_factor">TIMEOUT_FACTOR</h4>
|
||||
<p>Currently only applies to JTReg.</p>
|
||||
<h4 id="java_options">JAVA_OPTIONS</h4>
|
||||
<p>Applies to JTReg, GTest and Micro.</p>
|
||||
<h4 id="vm_options">VM_OPTIONS</h4>
|
||||
<p>Applies to JTReg, GTest and Micro.</p>
|
||||
<h4 id="java_options">JAVA_OPTIONS</h4>
|
||||
<p>Applies to JTReg, GTest and Micro.</p>
|
||||
<h4 id="aot_modules">AOT_MODULES</h4>
|
||||
<p>Applies to JTReg and GTest.</p>
|
||||
<h4 id="jcov">JCOV</h4>
|
||||
<p>This keywords applies globally to the test runner system. If set to <code>true</code>, it enables JCov coverage reporting for all tests run. To be useful, the JDK under test must be run with a JDK built with JCov instrumentation (<code>configure --with-jcov=<path to directory containing lib/jcov.jar></code>, <code>make jcov-image</code>).</p>
|
||||
<p>The simplest way to run tests with JCov coverage report is to use the special target <code>jcov-test</code> instead of <code>test</code>, e.g. <code>make jcov-test TEST=jdk_lang</code>. This will make sure the JCov image is built, and that JCov reporting is enabled.</p>
|
||||
<p>The JCov report is stored in <code>build/$BUILD/test-results/jcov-output/report</code>.</p>
|
||||
<p>The JCov report is stored in <code>build/$BUILD/test-results/jcov-output</code>.</p>
|
||||
<p>Please note that running with JCov reporting can be very memory intensive.</p>
|
||||
<h4 id="jcov_diff_changeset">JCOV_DIFF_CHANGESET</h4>
|
||||
<p>While collecting code coverage with JCov, it is also possible to find coverage for only recently changed code. JCOV_DIFF_CHANGESET specifies a source revision. A textual report will be generated showing coverage of the diff between the specified revision and the repository tip.</p>
|
||||
@@ -133,7 +133,7 @@ TEST FAILURE</code></pre>
|
||||
<h3 id="jtreg-keywords">JTReg keywords</h3>
|
||||
<h4 id="jobs-1">JOBS</h4>
|
||||
<p>The test concurrency (<code>-concurrency</code>).</p>
|
||||
<p>Defaults to TEST_JOBS (if set by <code>--with-test-jobs=</code>), otherwise it defaults to JOBS, except for Hotspot, where the default is <em>number of CPU cores/2</em>, but never more than <em>memory size in GB/2</em>.</p>
|
||||
<p>Defaults to TEST_JOBS (if set by <code>--with-test-jobs=</code>), otherwise it defaults to JOBS, except for Hotspot, where the default is <em>number of CPU cores/2</em> (for sparc, if more than 16 cpus, then <em>number of CPU cores/5</em>, otherwise <em>number of CPU cores/4</em>), but never more than <em>memory size in GB/2</em>.</p>
|
||||
<h4 id="timeout_factor-1">TIMEOUT_FACTOR</h4>
|
||||
<p>The timeout factor (<code>-timeoutFactor</code>).</p>
|
||||
<p>Defaults to 4.</p>
|
||||
@@ -166,10 +166,9 @@ TEST FAILURE</code></pre>
|
||||
<p>Additional options to the JTReg test framework.</p>
|
||||
<p>Use <code>JTREG="OPTIONS=--help all"</code> to see all available JTReg options.</p>
|
||||
<h4 id="java_options-1">JAVA_OPTIONS</h4>
|
||||
<p>Additional Java options for running test classes (sent to JTReg as <code>-javaoption</code>).</p>
|
||||
<p>Additional Java options to JTReg (<code>-javaoption</code>).</p>
|
||||
<h4 id="vm_options-1">VM_OPTIONS</h4>
|
||||
<p>Additional Java options to be used when compiling and running classes (sent to JTReg as <code>-vmoption</code>).</p>
|
||||
<p>This option is only needed in special circumstances. To pass Java options to your test classes, use <code>JAVA_OPTIONS</code>.</p>
|
||||
<p>Additional VM options to JTReg (<code>-vmoption</code>).</p>
|
||||
<h4 id="aot_modules-1">AOT_MODULES</h4>
|
||||
<p>Generate AOT modules before testing for the specified module, or set of modules. If multiple modules are specified, they should be separated by space (or, to help avoid quoting issues, the special value <code>%20</code>).</p>
|
||||
<h4 id="retry_count">RETRY_COUNT</h4>
|
||||
|
||||
@@ -23,7 +23,7 @@ Some example command-lines:
|
||||
$ make test-jdk_lang JTREG="JOBS=8"
|
||||
$ make test TEST=jdk_lang
|
||||
$ make test-only TEST="gtest:LogTagSet gtest:LogTagSetDescriptions" GTEST="REPEAT=-1"
|
||||
$ make test TEST="hotspot:hotspot_gc" JTREG="JOBS=1;TIMEOUT_FACTOR=8;JAVA_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"
|
||||
$ make test TEST="hotspot:hotspot_gc" JTREG="JOBS=1;TIMEOUT_FACTOR=8;VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"
|
||||
$ make test TEST="jtreg:test/hotspot:hotspot_gc test/hotspot/jtreg/native_sanity/JniVersion.java"
|
||||
$ make test TEST="micro:java.lang.reflect" MICRO="FORK=1;WARMUP_ITER=2"
|
||||
$ make exploded-test TEST=tier2
|
||||
@@ -190,11 +190,11 @@ pass unnoticed.
|
||||
To separate multiple keyword=value pairs, use `;` (semicolon). Since the shell
|
||||
normally eats `;`, the recommended usage is to write the assignment inside
|
||||
qoutes, e.g. `JTREG="...;..."`. This will also make sure spaces are preserved,
|
||||
as in `JTREG="JAVA_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"`.
|
||||
as in `JTREG="VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"`.
|
||||
|
||||
(Other ways are possible, e.g. using backslash: `JTREG=JOBS=1\;TIMEOUT_FACTOR=8`.
|
||||
Also, as a special technique, the string `%20` will be replaced with space for
|
||||
certain options, e.g. `JTREG=JAVA_OPTIONS=-XshowSettings%20-Xlog:gc+ref=debug`.
|
||||
certain options, e.g. `JTREG=VM_OPTIONS=-XshowSettings%20-Xlog:gc+ref=debug`.
|
||||
This can be useful if you have layers of scripts and have trouble getting
|
||||
proper quoting of command line arguments through.)
|
||||
|
||||
@@ -218,11 +218,11 @@ Currently only applies to JTReg.
|
||||
|
||||
Currently only applies to JTReg.
|
||||
|
||||
#### JAVA_OPTIONS
|
||||
#### VM_OPTIONS
|
||||
|
||||
Applies to JTReg, GTest and Micro.
|
||||
|
||||
#### VM_OPTIONS
|
||||
#### JAVA_OPTIONS
|
||||
|
||||
Applies to JTReg, GTest and Micro.
|
||||
|
||||
@@ -250,7 +250,7 @@ Please note that running with JCov reporting can be very memory intensive.
|
||||
While collecting code coverage with JCov, it is also possible to find coverage
|
||||
for only recently changed code. JCOV_DIFF_CHANGESET specifies a source
|
||||
revision. A textual report will be generated showing coverage of the diff
|
||||
between the specified revision and the repository tip.
|
||||
between the specified revision and the repository tip.
|
||||
|
||||
The report is stored in `build/$BUILD/test-results/jcov-output/diff_coverage_report`
|
||||
file.
|
||||
@@ -261,8 +261,9 @@ file.
|
||||
The test concurrency (`-concurrency`).
|
||||
|
||||
Defaults to TEST_JOBS (if set by `--with-test-jobs=`), otherwise it defaults to
|
||||
JOBS, except for Hotspot, where the default is *number of CPU cores/2*,
|
||||
but never more than *memory size in GB/2*.
|
||||
JOBS, except for Hotspot, where the default is *number of CPU cores/2* (for
|
||||
sparc, if more than 16 cpus, then *number of CPU cores/5*, otherwise *number of
|
||||
CPU cores/4*), but never more than *memory size in GB/2*.
|
||||
|
||||
#### TIMEOUT_FACTOR
|
||||
The timeout factor (`-timeoutFactor`).
|
||||
@@ -330,15 +331,10 @@ Additional options to the JTReg test framework.
|
||||
Use `JTREG="OPTIONS=--help all"` to see all available JTReg options.
|
||||
|
||||
#### JAVA_OPTIONS
|
||||
Additional Java options for running test classes (sent to JTReg as
|
||||
`-javaoption`).
|
||||
Additional Java options to JTReg (`-javaoption`).
|
||||
|
||||
#### VM_OPTIONS
|
||||
Additional Java options to be used when compiling and running classes (sent to
|
||||
JTReg as `-vmoption`).
|
||||
|
||||
This option is only needed in special circumstances. To pass Java options to
|
||||
your test classes, use `JAVA_OPTIONS`.
|
||||
Additional VM options to JTReg (`-vmoption`).
|
||||
|
||||
#### AOT_MODULES
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
# jetbrains/runtime:jbr15env
|
||||
FROM centos:7
|
||||
RUN yum -y install centos-release-scl
|
||||
RUN yum -y install devtoolset-8
|
||||
RUN yum -y install zip bzip2 unzip tar wget make autoconf automake libtool alsa-devel cups-devel xorg-x11-devel libjpeg62-devel giflib-devel freetype-devel file which libXtst-devel libXt-devel libXrender-devel alsa-lib-devel fontconfig-devel libXrandr-devel libXi-devel git
|
||||
# Install Java 11
|
||||
RUN wget https://download.java.net/java/GA/jdk14.0.1/664493ef4a6946b186ff29eb326336a2/7/GPL/openjdk-14.0.1_linux-x64_bin.tar.gz \
|
||||
-O - | tar xz -C /
|
||||
ENV JAVA_HOME /jbrsdk
|
||||
ENV PATH $JAVA_HOME/bin:/opt/rh/devtoolset-8/root/usr/bin:$PATH
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
script_dir=jb/project/tools/linux/scripts
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jcef" || exit $?
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx" || exit $?
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx_jcef" || exit $?
|
||||
@@ -1,77 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
--with-debug-level=release \
|
||||
--with-version-build=$JDK_BUILD_NUMBER \
|
||||
--with-version-pre= \
|
||||
--with-version-opt=b$build_number \
|
||||
--with-boot-jdk=amazon-corretto-11.0.5.10.1-linux-aarch64 \
|
||||
--with-import-modules=./modular-sdk \
|
||||
--enable-cds=yes || exit $?
|
||||
make clean CONF=linux-aarch64-normal-server-release || exit $?
|
||||
make images CONF=linux-aarch64-normal-server-release test-image || exit $?
|
||||
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-aarch64-b${build_number}
|
||||
BASE_DIR=build/linux-aarch64-normal-server-release/images
|
||||
JSDK=${BASE_DIR}/jdk
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
|
||||
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
tar -pcf $JBSDK.tar \
|
||||
--exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
|
||||
-C $BASE_DIR ${JBRSDK_BUNDLE} || exit $?
|
||||
gzip $JBSDK.tar || exit $?
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
rm -rf $BASE_DIR/$JBR_BUNDLE
|
||||
|
||||
JBR=$JBR_BASE_NAME-linux-aarch64-b$build_number
|
||||
grep -v javafx modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.aarch64
|
||||
echo Running jlink....
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list.aarch64 | sed s/" "//g | sed s/,$//g) \
|
||||
--output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
|
||||
|
||||
echo Modifying release info ...
|
||||
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${BASE_DIR}/${JBR_BUNDLE}/release
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
tar -pcf $JBR.tar -C $BASE_DIR ${JBR_BUNDLE} || exit $?
|
||||
gzip $JBR.tar || exit $?
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-aarch64-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' test || exit $?
|
||||
gzip $JBRSDK_TEST.tar || exit $?
|
||||
@@ -1,139 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
|
||||
function create_jbr {
|
||||
|
||||
case "$1" in
|
||||
"${bundle_type}_lw")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}_lw-${JBSDK_VERSION}
|
||||
grep -v "jdk.compiler\|jdk.hotspot.agent" modules.list > modules_tmp.list
|
||||
;;
|
||||
"jfx" | "jcef")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
|
||||
cat modules.list > modules_tmp.list
|
||||
;;
|
||||
"jfx_jcef")
|
||||
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
|
||||
cat modules.list > modules_tmp.list
|
||||
;;
|
||||
*)
|
||||
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
|
||||
cat modules.list > modules_tmp.list
|
||||
;;
|
||||
esac
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
|
||||
JBR=$JBR_BASE_NAME-linux-x64-b$build_number
|
||||
|
||||
echo Running jlink....
|
||||
$JSDK/bin/jlink \
|
||||
--module-path $JSDK/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output $BASE_DIR/$JBR_BUNDLE
|
||||
|
||||
if [[ "$bundle_type" == *jcef* ]]; then
|
||||
cp -R $BASE_DIR/$JBR_BUNDLE $BASE_DIR/jbr
|
||||
cp -R jcef_linux_x64/* $BASE_DIR/$JBR_BUNDLE/lib || exit $?
|
||||
fi
|
||||
grep -v "^JAVA_VERSION" $JSDK/release | grep -v "^MODULES" >> $BASE_DIR/$JBR_BUNDLE/release
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
if [ ! -z "$bundle_type" ]; then
|
||||
rm -rf ${BASE_DIR}/jbr
|
||||
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
|
||||
fi
|
||||
tar -pcf $JBR.tar -C $BASE_DIR jbr || exit $?
|
||||
gzip $JBR.tar || exit $?
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
|
||||
|
||||
#git checkout -- modules.list src
|
||||
case "$bundle_type" in
|
||||
"jfx")
|
||||
git apply -p0 < jb/project/tools/exclude_jcef_module.patch
|
||||
;;
|
||||
"jcef")
|
||||
git apply -p0 < jb/project/tools/exclude_jfx_module.patch
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$bundle_type" ]; then
|
||||
JBR_BUNDLE=jbr
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
--with-debug-level=release \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-boot-jdk=$BOOT_JDK \
|
||||
--enable-cds=yes || exit $?
|
||||
else
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
--with-debug-level=release \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-import-modules=./modular-sdk \
|
||||
--with-boot-jdk=$BOOT_JDK \
|
||||
--enable-cds=yes || exit $?
|
||||
fi
|
||||
|
||||
make images CONF=linux-x86_64-server-release || exit $?
|
||||
|
||||
JSDK=build/linux-x86_64-server-release/images/jdk
|
||||
JBSDK=$JBRSDK_BASE_NAME-linux-x64-b$build_number
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
BASE_DIR=build/linux-x86_64-server-release/images
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
|
||||
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
|
||||
if [[ "$bundle_type" == *jcef* ]]; then
|
||||
cp -R jcef_linux_x64/* $BASE_DIR/$JBRSDK_BUNDLE/lib || exit $?
|
||||
fi
|
||||
if [[ "$bundle_type" == "jfx_jcef" || -z "$bundle_type" ]]; then
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
tar -pcf $JBSDK.tar --exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
|
||||
-C $BASE_DIR $JBRSDK_BUNDLE || exit $?
|
||||
gzip $JBSDK.tar || exit $?
|
||||
fi
|
||||
|
||||
create_jbr ${bundle_type}
|
||||
|
||||
if [[ "$bundle_type" == "jfx_jcef" || -z "$bundle_type" ]]; then
|
||||
make test-image || exit $?
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-x64-b$build_number
|
||||
|
||||
echo Creating $JBSDK_TEST.tar.gz ...
|
||||
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' test || exit $?
|
||||
gzip $JBRSDK_TEST.tar || exit $?
|
||||
fi
|
||||
@@ -1,72 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
--with-debug-level=fastdebug \
|
||||
--with-version-build=$JDK_BUILD_NUMBER \
|
||||
--with-version-pre= \
|
||||
--with-version-opt=b$build_number \
|
||||
--with-import-modules=./modular-sdk \
|
||||
--enable-cds=yes || exit $?
|
||||
make clean CONF=linux-x86_64-normal-server-fastdebug || exit $?
|
||||
make images CONF=linux-x86_64-normal-server-fastdebug || exit $?
|
||||
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-x64-fastdebug-b${build_number}
|
||||
BASE_DIR=build/linux-x86_64-normal-server-fastdebug/images
|
||||
JSDK=${BASE_DIR}/jdk
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
|
||||
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
cp -R jcef_linux_x64/* $BASE_DIR/$JBRSDK_BUNDLE/lib || exit $?
|
||||
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
tar -pcf $JBSDK.tar \
|
||||
--exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
|
||||
-C $BASE_DIR ${JBRSDK_BUNDLE} || exit $?
|
||||
gzip $JBSDK.tar || exit $?
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
rm -rf $BASE_DIR/$JBR_BUNDLE
|
||||
|
||||
JBR=$JBR_BASE_NAME-linux-x64-fastdebug-b$build_number
|
||||
echo Running jlink....
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list | sed s/" "//g | sed s/,$//g) \
|
||||
--output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
|
||||
cp -R jcef_linux_x64/* $BASE_DIR/$JBR_BUNDLE/lib || exit $?
|
||||
|
||||
echo Modifying release info ...
|
||||
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${BASE_DIR}/${JBR_BUNDLE}/release
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
tar -czf $JBR.tar -C $BASE_DIR ${JBR_BUNDLE} || exit $?
|
||||
gzip $JBR.tar || exit $?
|
||||
@@ -1,73 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
|
||||
linux32 bash configure \
|
||||
--disable-warnings-as-errors \
|
||||
--with-debug-level=release \
|
||||
--with-version-build=$JDK_BUILD_NUMBER \
|
||||
--with-version-pre= \
|
||||
--with-version-opt=b$build_number \
|
||||
--with-boot-jdk=/jbrsdk-11.0.5-b1 \
|
||||
--enable-cds=yes || exit $?
|
||||
make clean CONF=linux-x86-normal-server-release || exit $?
|
||||
make images CONF=linux-x86-normal-server-release test-image || exit $?
|
||||
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-x86-b${build_number}
|
||||
BASE_DIR=build/linux-x86-normal-server-release/images
|
||||
JSDK=${BASE_DIR}/jdk
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
|
||||
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
tar -pcf $JBSDK.tar --exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man -C $BASE_DIR ${JBRSDK_BUNDLE} || exit $?
|
||||
gzip $JBSDK.tar || exit $?
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
rm -rf $BASE_DIR/$JBR_BUNDLE
|
||||
|
||||
JBR=$JBR_BASE_NAME-linux-x86-b$build_number
|
||||
grep -v javafx modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.x86
|
||||
echo Running jlink....
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list.x86 | sed s/" "//g | sed s/,$//g) --output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
|
||||
|
||||
echo Modifying release info ...
|
||||
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${BASE_DIR}/${JBR_BUNDLE}/release
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
tar -pcf $JBR.tar -C $BASE_DIR $JBR_BUNDLE || exit $?
|
||||
gzip $JBR.tar || exit $?
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-x86-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' --exclude='test/hotspot/gtest' test || exit $?
|
||||
gzip $JBRSDK_TEST.tar || exit $?
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
script_dir=jb/project/tools/mac/scripts
|
||||
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jcef" || exit $?
|
||||
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx" || exit $?
|
||||
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx_jcef" || exit $?
|
||||
@@ -1,148 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
|
||||
function create_jbr {
|
||||
|
||||
case "$1" in
|
||||
"${bundle_type}_lw")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}_lw-${JBSDK_VERSION}
|
||||
grep -v "jdk.compiler\|jdk.hotspot.agent" modules.list > modules_tmp.list
|
||||
;;
|
||||
"jfx" | "jcef")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
|
||||
cat modules.list > modules_tmp.list
|
||||
;;
|
||||
"jfx_jcef")
|
||||
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
|
||||
cat modules.list > modules_tmp.list
|
||||
;;
|
||||
*)
|
||||
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
|
||||
cat modules.list > modules_tmp.list
|
||||
;;
|
||||
esac
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
|
||||
JRE_CONTENTS=${BASE_DIR}/${JBR_BUNDLE}/Contents
|
||||
JRE_HOME=${JRE_CONTENTS}/Home
|
||||
if [ -d "${JRE_CONTENTS}" ]; then
|
||||
rm -rf ${JRE_CONTENTS}
|
||||
fi
|
||||
mkdir -p ${JRE_CONTENTS}
|
||||
|
||||
JBR=${JBR_BASE_NAME}-osx-x64-b${build_number}
|
||||
|
||||
${BASE_DIR}/$JBRSDK_BUNDLE/Contents/Home/bin/jlink \
|
||||
--module-path ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output ${JRE_HOME} || exit $?
|
||||
grep -v "^JAVA_VERSION" ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release | grep -v "^MODULES" >> ${JRE_HOME}/release
|
||||
cp -R ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/MacOS ${JRE_CONTENTS}
|
||||
cp ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Info.plist ${JRE_CONTENTS}
|
||||
|
||||
if [[ "${bundle_type}" == *jcef* ]]; then
|
||||
rm -rf ${JRE_CONTENTS}/Frameworks || exit $?
|
||||
rm -rf ${JRE_CONTENTS}/Helpers || exit $?
|
||||
cp -a jcef_mac/Frameworks ${JRE_CONTENTS} || exit $?
|
||||
cp -a jcef_mac/Helpers ${JRE_CONTENTS} || exit $?
|
||||
fi
|
||||
|
||||
echo Creating ${JBR}.tar.gz ...
|
||||
if [ ! -z "$bundle_type" ]; then
|
||||
rm -rf ${BASE_DIR}/jbr
|
||||
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
|
||||
fi
|
||||
COPYFILE_DISABLE=1 tar -pczf ${JBR}.tar.gz --exclude='*.dSYM' --exclude='man' -C ${BASE_DIR} jbr || exit $?
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
|
||||
#git checkout -- modules.list src
|
||||
case "$bundle_type" in
|
||||
"jfx")
|
||||
git apply -p0 < jb/project/tools/exclude_jcef_module.patch
|
||||
;;
|
||||
"jcef")
|
||||
git apply -p0 < jb/project/tools/exclude_jfx_module.patch
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$bundle_type" ]; then
|
||||
JBR_BUNDLE=jbr
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
--with-debug-level=release \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-boot-jdk=`/usr/libexec/java_home -v $BOOT_JDK` \
|
||||
--enable-cds=yes || exit $?
|
||||
else
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
--with-debug-level=release \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-import-modules=./modular-sdk \
|
||||
--with-boot-jdk=`/usr/libexec/java_home -v $BOOT_JDK` \
|
||||
--enable-cds=yes || exit $?
|
||||
fi
|
||||
make images CONF=macosx-x86_64-server-release || exit $?
|
||||
|
||||
JSDK=build/macosx-x86_64-server-release/images/jdk-bundle
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-b${build_number}
|
||||
|
||||
BASE_DIR=jre
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf $BASE_DIR
|
||||
mkdir $BASE_DIR || exit $?
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
cp -a $JSDK/jdk-$JBSDK_VERSION_WITH_DOTS.jdk $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
|
||||
if [[ "$bundle_type" == *jcef* ]]; then
|
||||
cp -a jcef_mac/Frameworks $BASE_DIR/$JBRSDK_BUNDLE/Contents/ || exit $?
|
||||
cp -a jcef_mac/Helpers $BASE_DIR/$JBRSDK_BUNDLE/Contents/ || exit $?
|
||||
fi
|
||||
if [[ "$bundle_type" == "jfx_jcef" || -z "$bundle_type" ]]; then
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
COPYFILE_DISABLE=1 tar -pczf $JBSDK.tar.gz -C $BASE_DIR \
|
||||
--exclude='._*' --exclude='.DS_Store' --exclude='*~' \
|
||||
--exclude='Home/demo' --exclude='Home/man' --exclude='Home/sample' \
|
||||
$JBRSDK_BUNDLE || exit $?
|
||||
fi
|
||||
|
||||
create_jbr "${bundle_type}" || exit $?
|
||||
|
||||
if [[ "$bundle_type" == "jfx_jcef" || -z "$bundle_type" ]]; then
|
||||
make test-image || exit $?
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-osx-test-x64-b$build_number
|
||||
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
COPYFILE_DISABLE=1 tar -pczf $JBRSDK_TEST.tar.gz -C build/macosx-x86_64-server-release/images \
|
||||
--exclude='test/jdk/demos' test || exit $?
|
||||
fi
|
||||
@@ -1,83 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
--with-debug-level=fastdebug \
|
||||
--with-version-build=$JDK_BUILD_NUMBER \
|
||||
--with-version-pre= \
|
||||
--with-version-opt=b$build_number \
|
||||
--with-import-modules=./modular-sdk \
|
||||
--with-boot-jdk=`/usr/libexec/java_home -v 11` \
|
||||
--enable-cds=yes || exit $?
|
||||
make clean CONF=macosx-x86_64-normal-server-fastdebug || exit $?
|
||||
make images CONF=macosx-x86_64-normal-server-fastdebug || exit $?
|
||||
|
||||
JSDK=build/macosx-x86_64-normal-server-fastdebug/images/jdk-bundle
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-fastdebug-b${build_number}
|
||||
|
||||
BASE_DIR=jre
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf $BASE_DIR
|
||||
mkdir $BASE_DIR || exit $?
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
cp -a $JSDK/jdk-$JBSDK_VERSION_WITH_DOTS.jdk $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
cp -a jcef_mac/Frameworks $BASE_DIR/$JBRSDK_BUNDLE/Contents/
|
||||
cp -a jcef_mac/Helpers $BASE_DIR/$JBRSDK_BUNDLE/Contents
|
||||
|
||||
COPYFILE_DISABLE=1 \
|
||||
tar -pczf ${JBSDK}.tar.gz -C ${BASE_DIR} \
|
||||
--exclude='._*' --exclude='.DS_Store' --exclude='*~' \
|
||||
--exclude='Home/demo' --exclude='Home/man' --exclude='Home/sample' \
|
||||
${JBRSDK_BUNDLE} || exit $?
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
JRE_CONTENTS=$BASE_DIR/$JBR_BUNDLE/Contents
|
||||
JRE_HOME=$JRE_CONTENTS/Home
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
|
||||
mkdir -p $JRE_CONTENTS
|
||||
|
||||
if [ -d "$JRE_HOME" ]; then
|
||||
rm -rf $JRE_HOME
|
||||
fi
|
||||
|
||||
JBR=${JBR_BASE_NAME}-osx-x64-fastdebug-b${build_number}
|
||||
|
||||
$BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/bin/jlink \
|
||||
--module-path $BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list | sed s/" "//g) --output $JRE_HOME || exit $?
|
||||
grep -v "^JAVA_VERSION" $BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/release | grep -v "^MODULES" >> $JRE_HOME/release
|
||||
cp -R $BASE_DIR/$JBRSDK_BUNDLE/Contents/MacOS $JRE_CONTENTS
|
||||
cp $BASE_DIR/$JBRSDK_BUNDLE/Contents/Info.plist $JRE_CONTENTS
|
||||
cp -a jcef_mac/Frameworks ${JRE_CONTENTS} || exit $?
|
||||
cp -a jcef_mac/Helpers ${JRE_CONTENTS} || exit $?
|
||||
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
COPYFILE_DISABLE=1 tar -pczf $JBR.tar.gz --exclude='*.dSYM' --exclude='man' -C $BASE_DIR $JBR_BUNDLE || exit $?
|
||||
@@ -1,120 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
APP_DIRECTORY=$1
|
||||
APPL_USER=$2
|
||||
APPL_PASSWORD=$3
|
||||
APP_NAME=$4
|
||||
BUNDLE_ID=$5
|
||||
FAKE_ROOT="${6:-fake-root}"
|
||||
|
||||
if [[ -z "$APP_DIRECTORY" ]] || [[ -z "$APPL_USER" ]] || [[ -z "$APPL_PASSWORD" ]]; then
|
||||
echo "Usage: $0 AppDirectory Username Password"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -d "$APP_DIRECTORY" ]]; then
|
||||
echo "AppDirectory '$APP_DIRECTORY' does not exist or not a directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function log() {
|
||||
echo "$(date '+[%H:%M:%S]') $*"
|
||||
}
|
||||
|
||||
function publish-log() {
|
||||
id=$1
|
||||
file=$2
|
||||
curl -T "$file" "$ARTIFACTORY_URL/$id" || true
|
||||
}
|
||||
|
||||
function altool-upload() {
|
||||
# Since altool uses same file for upload token we have to trick it into using different folders for token file location
|
||||
# Also it copies zip into TMPDIR so we override it too, to simplify cleanup
|
||||
OLD_HOME="$HOME"
|
||||
export HOME="$FAKE_ROOT/home"
|
||||
export TMPDIR="$FAKE_ROOT/tmp"
|
||||
mkdir -p "$HOME"
|
||||
mkdir -p "$TMPDIR"
|
||||
export _JAVA_OPTIONS="-Duser.home=$HOME -Djava.io.tmpdir=$TMPDIR"
|
||||
# Reduce amount of downloads, cache transporter libraries
|
||||
shared_itmstransporter="$OLD_HOME/shared-itmstransporter"
|
||||
if [[ -f "$shared_itmstransporter" ]]; then
|
||||
cp -r "$shared_itmstransporter" "$HOME/.itmstransporter"
|
||||
fi
|
||||
# For some reason altool prints everything to stderr, not stdout
|
||||
set +e
|
||||
xcrun altool --notarize-app \
|
||||
--username "$APPL_USER" --password "$APPL_PASSWORD" \
|
||||
--primary-bundle-id "$BUNDLE_ID" \
|
||||
--asc-provider JetBrainssro --file "$1" 2>&1 | tee "altool.init.out"
|
||||
unset TMPDIR
|
||||
export HOME="$OLD_HOME"
|
||||
set -e
|
||||
}
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
|
||||
file="$APP_NAME.zip"
|
||||
|
||||
log "Zipping $file..."
|
||||
rm -rf "$file"
|
||||
ditto -c -k --sequesterRsrc --keepParent "$APP_DIRECTORY/Contents" "$file"
|
||||
|
||||
log "Notarizing $file..."
|
||||
rm -rf "altool.init.out" "altool.check.out"
|
||||
altool-upload "$file"
|
||||
|
||||
rm -rf "$file"
|
||||
|
||||
notarization_info="$(grep -e "RequestUUID" "altool.init.out" | grep -oE '([0-9a-f-]{36})')"
|
||||
|
||||
if [ -z "$notarization_info" ]; then
|
||||
log "Faile to read RequestUUID from altool.init.out"
|
||||
exit 10
|
||||
fi
|
||||
|
||||
PATH="$PATH:/usr/local/bin/"
|
||||
|
||||
log "Notarization request sent, awaiting response"
|
||||
spent=0
|
||||
|
||||
while true; do
|
||||
# For some reason altool prints everything to stderr, not stdout
|
||||
xcrun altool --username "$APPL_USER" --notarization-info "$notarization_info" --password "$APPL_PASSWORD" >"altool.check.out" 2>&1 || true
|
||||
status="$(grep -oe 'Status: .*' "altool.check.out" | cut -c 9- || true)"
|
||||
log "Current status: $status"
|
||||
if [ "$status" = "invalid" ]; then
|
||||
log "Notarization failed"
|
||||
ec=1
|
||||
elif [ "$status" = "success" ]; then
|
||||
log "Notarization succeeded"
|
||||
ec=0
|
||||
else
|
||||
if [ "$status" != "in progress" ]; then
|
||||
log "Unknown notarization status, waiting more, altool output:"
|
||||
cat "altool.check.out"
|
||||
fi
|
||||
if [[ $spent -gt 60 ]]; then
|
||||
log "Waiting time out (apx 60 minutes)"
|
||||
ec=2
|
||||
break
|
||||
fi
|
||||
sleep 60
|
||||
((spent += 1))
|
||||
continue
|
||||
fi
|
||||
developer_log="developer_log.json"
|
||||
log "Fetching $developer_log"
|
||||
# TODO: Replace cut with trim or something better
|
||||
url="$(grep -oe 'LogFileURL: .*' "altool.check.out" | cut -c 13-)"
|
||||
wget "$url" -O "$developer_log" && cat "$developer_log" || true
|
||||
if [ $ec != 0 ]; then
|
||||
log "Publishing $developer_log"
|
||||
publish-log "$notarization_info" "$developer_log"
|
||||
fi
|
||||
break
|
||||
done
|
||||
cat "altool.check.out"
|
||||
|
||||
rm -rf "altool.init.out" "altool.check.out"
|
||||
exit $ec
|
||||
@@ -1,93 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
APP_DIRECTORY=$1
|
||||
JB_CERT=$2
|
||||
|
||||
if [[ -z "$APP_DIRECTORY" ]] || [[ -z "$JB_CERT" ]]; then
|
||||
echo "Usage: $0 AppDirectory CertificateID"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -d "$APP_DIRECTORY" ]]; then
|
||||
echo "AppDirectory '$APP_DIRECTORY' does not exist or not a directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function log() {
|
||||
echo "$(date '+[%H:%M:%S]') $*"
|
||||
}
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
|
||||
# Cleanup files left from previous sign attempt (if any)
|
||||
find "$APP_DIRECTORY" -name '*.cstemp' -exec rm '{}' \;
|
||||
|
||||
log "Signing libraries and executables..."
|
||||
# -perm +111 searches for executables
|
||||
for f in \
|
||||
"Contents/Home/bin" \
|
||||
"Contents/Home/lib"; do
|
||||
if [ -d "$APP_DIRECTORY/$f" ]; then
|
||||
find "$APP_DIRECTORY/$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -perm +111 \) \
|
||||
-exec codesign --timestamp \
|
||||
-v -s "$JB_CERT" --options=runtime \
|
||||
--entitlements entitlements.xml {} \;
|
||||
fi
|
||||
done
|
||||
|
||||
log "Signing libraries in jars in $PWD"
|
||||
|
||||
# todo: add set -euo pipefail; into the inner sh -c
|
||||
# `-e` prevents `grep -q && printf` loginc
|
||||
# with `-o pipefail` there's no input for 'while' loop
|
||||
find "$APP_DIRECTORY" -name '*.jar' \
|
||||
-exec sh -c "set -u; unzip -l \"\$0\" | grep -q -e '\.dylib\$' -e '\.jnilib\$' -e '\.so\$' -e '^jattach\$' && printf \"\$0\0\" " {} \; |
|
||||
while IFS= read -r -d $'\0' file; do
|
||||
log "Processing libraries in $file"
|
||||
|
||||
rm -rf jarfolder jar.jar
|
||||
mkdir jarfolder
|
||||
filename="${file##*/}"
|
||||
log "Filename: $filename"
|
||||
cp "$file" jarfolder && (cd jarfolder && jar xf "$filename" && rm "$filename")
|
||||
|
||||
find jarfolder \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "jattach" \) \
|
||||
-exec codesign --timestamp \
|
||||
-v -s "$JB_CERT" --options=runtime \
|
||||
--entitlements entitlements.xml {} \;
|
||||
|
||||
(cd jarfolder; zip -q -r -o ../jar.jar .)
|
||||
mv jar.jar "$file"
|
||||
done
|
||||
|
||||
rm -rf jarfolder jar.jar
|
||||
|
||||
log "Signing other files..."
|
||||
for f in \
|
||||
"Contents/MacOS"; do
|
||||
if [ -d "$APP_DIRECTORY/$f" ]; then
|
||||
find "$APP_DIRECTORY/$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -perm +111 \) \
|
||||
-exec codesign --timestamp \
|
||||
-v -s "$JB_CERT" --options=runtime \
|
||||
--entitlements entitlements.xml {} \;
|
||||
fi
|
||||
done
|
||||
|
||||
#log "Signing executable..."
|
||||
#codesign --timestamp \
|
||||
# -v -s "$JB_CERT" --options=runtime \
|
||||
# --force \
|
||||
# --entitlements entitlements.xml "$APP_DIRECTORY/Contents/MacOS/idea"
|
||||
|
||||
log "Signing whole app..."
|
||||
codesign --timestamp \
|
||||
-v -s "$JB_CERT" --options=runtime \
|
||||
--force \
|
||||
--entitlements entitlements.xml "$APP_DIRECTORY"
|
||||
|
||||
log "Verifying java is not broken"
|
||||
find "$APP_DIRECTORY" \
|
||||
-type f -name 'java' -perm +111 -exec {} -version \;
|
||||
@@ -1,145 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
|
||||
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
|
||||
export COPYFILE_DISABLE=true
|
||||
|
||||
INPUT_FILE=$1
|
||||
EXPLODED=$2.exploded
|
||||
BACKUP_JMODS=$2.backup
|
||||
USERNAME=$3
|
||||
PASSWORD=$4
|
||||
CODESIGN_STRING=$5
|
||||
NOTARIZE=$6
|
||||
BUNDLE_ID=$7
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
function log() {
|
||||
echo "$(date '+[%H:%M:%S]') $*"
|
||||
}
|
||||
|
||||
log "Deleting $EXPLODED ..."
|
||||
if test -d "$EXPLODED"; then
|
||||
find "$EXPLODED" -mindepth 1 -maxdepth 1 -exec chmod -R u+wx '{}' \;
|
||||
fi
|
||||
rm -rf "$EXPLODED"
|
||||
mkdir "$EXPLODED"
|
||||
rm -rf "$BACKUP_JMODS"
|
||||
mkdir "$BACKUP_JMODS"
|
||||
|
||||
log "Unzipping $INPUT_FILE to $EXPLODED ..."
|
||||
tar -xzvf "$INPUT_FILE" --directory $EXPLODED
|
||||
rm "$INPUT_FILE"
|
||||
BUILD_NAME="$(ls "$EXPLODED")"
|
||||
if test -d $EXPLODED/$BUILD_NAME/Contents/Home/jmods; then
|
||||
mv $EXPLODED/$BUILD_NAME/Contents/Home/jmods $BACKUP_JMODS
|
||||
fi
|
||||
if test -d $EXPLODED/$BUILD_NAME/Contents/Home/Frameworks; then
|
||||
mv $EXPLODED/$BUILD_NAME/Contents/Home/Frameworks $BACKUP_JMODS
|
||||
fi
|
||||
if test -f $EXPLODED/$BUILD_NAME/Contents/MacOS/libjli.dylib; then
|
||||
mv $EXPLODED/$BUILD_NAME/Contents/MacOS/libjli.dylib $BACKUP_JMODS
|
||||
fi
|
||||
|
||||
#log "$INPUT_FILE unzipped and removed"
|
||||
log "$INPUT_FILE extracted and removed"
|
||||
|
||||
APPLICATION_PATH="$EXPLODED/$BUILD_NAME"
|
||||
|
||||
find "$APPLICATION_PATH/Contents/Home/bin" \
|
||||
-maxdepth 1 -type f -name '*.jnilib' -print0 |
|
||||
while IFS= read -r -d $'\0' file; do
|
||||
if [ -f "$file" ]; then
|
||||
log "Linking $file"
|
||||
b="$(basename "$file" .jnilib)"
|
||||
ln -sf "$b.jnilib" "$(dirname "$file")/$b.dylib"
|
||||
fi
|
||||
done
|
||||
|
||||
find "$APPLICATION_PATH/Contents/" \
|
||||
-maxdepth 1 -type f -name '*.txt' -print0 |
|
||||
while IFS= read -r -d $'\0' file; do
|
||||
if [ -f "$file" ]; then
|
||||
log "Moving $file"
|
||||
mv "$file" "$APPLICATION_PATH/Contents/Resources"
|
||||
fi
|
||||
done
|
||||
|
||||
non_plist=$(find "$APPLICATION_PATH/Contents/" -maxdepth 1 -type f -and -not -name 'Info.plist' | wc -l)
|
||||
if [[ $non_plist -gt 0 ]]; then
|
||||
log "Only Info.plist file is allowed in Contents directory but found $non_plist file(s):"
|
||||
log "$(find "$APPLICATION_PATH/Contents/" -maxdepth 1 -type f -and -not -name 'Info.plist')"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Unlocking keychain..."
|
||||
# Make sure *.p12 is imported into local KeyChain
|
||||
security unlock-keychain -p "$PASSWORD" "/Users/$USERNAME/Library/Keychains/login.keychain"
|
||||
|
||||
attempt=1
|
||||
limit=3
|
||||
set +e
|
||||
while [[ $attempt -le $limit ]]; do
|
||||
log "Signing (attempt $attempt) $APPLICATION_PATH ..."
|
||||
./sign.sh "$APPLICATION_PATH" "$CODESIGN_STRING"
|
||||
ec=$?
|
||||
if [[ $ec -ne 0 ]]; then
|
||||
((attempt += 1))
|
||||
if [ $attempt -eq $limit ]; then
|
||||
set -e
|
||||
fi
|
||||
log "Signing failed, wait for 30 sec and try to sign again"
|
||||
sleep 30
|
||||
else
|
||||
log "Signing done"
|
||||
codesign -v "$APPLICATION_PATH" -vvvvv
|
||||
log "Check sign done"
|
||||
((attempt += limit))
|
||||
fi
|
||||
done
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$NOTARIZE" = "yes" ]; then
|
||||
log "Notarizing..."
|
||||
# shellcheck disable=SC1090
|
||||
source "$HOME/.notarize_token"
|
||||
APP_NAME=$(echo ${INPUT_FILE} | awk -F"." '{ print $1 }')
|
||||
# Since notarization tool uses same file for upload token we have to trick it into using different folders, hence fake root
|
||||
# Also it leaves copy of zip file in TMPDIR, so notarize.sh overrides it and uses FAKE_ROOT as location for temp TMPDIR
|
||||
FAKE_ROOT="$(pwd)/fake-root"
|
||||
mkdir -p "$FAKE_ROOT"
|
||||
echo "Notarization will use fake root: $FAKE_ROOT"
|
||||
./notarize.sh "$APPLICATION_PATH" "$APPLE_USERNAME" "$APPLE_PASSWORD" "$APP_NAME" "$BUNDLE_ID" "$FAKE_ROOT"
|
||||
rm -rf "$FAKE_ROOT"
|
||||
|
||||
set +e
|
||||
log "Stapling..."
|
||||
xcrun stapler staple "$APPLICATION_PATH"
|
||||
else
|
||||
log "Notarization disabled"
|
||||
log "Stapling disabled"
|
||||
fi
|
||||
|
||||
log "Zipping $BUILD_NAME to $INPUT_FILE ..."
|
||||
(
|
||||
#cd "$EXPLODED"
|
||||
#ditto -c -k --sequesterRsrc --keepParent "$BUILD_NAME" "../$INPUT_FILE"
|
||||
if test ! -z $(ls $BACKUP_JMODS/libjli.dylib); then
|
||||
mv $BACKUP_JMODS/libjli.dylib $EXPLODED/$BUILD_NAME/Contents/MacOS
|
||||
fi
|
||||
if test -d $BACKUP_JMODS/jmods; then
|
||||
mv $BACKUP_JMODS/jmods $EXPLODED/$BUILD_NAME/Contents/Home
|
||||
fi
|
||||
if test -d $BACKUP_JMODS/Frameworks; then
|
||||
mv $BACKUP_JMODS/Frameworks $EXPLODED/$BUILD_NAME/Contents/Home
|
||||
fi
|
||||
|
||||
COPYFILE_DISABLE=1 tar -pczf $INPUT_FILE --exclude='*.dSYM' --exclude='man' -C $EXPLODED $BUILD_NAME
|
||||
log "Finished zipping"
|
||||
)
|
||||
rm -rf "$EXPLODED"
|
||||
log "Done"
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
script_dir=jb/project/tools/windows/scripts
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jcef" || exit $?
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx" || exit $?
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx_jcef" || exit $?
|
||||
@@ -1,119 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
|
||||
function create_jbr {
|
||||
|
||||
case "$1" in
|
||||
"${bundle_type}_lw")
|
||||
grep -v "jdk.compiler\|jdk.hotspot.agent" modules.list > modules_tmp.list
|
||||
;;
|
||||
"jfx" | "jcef" | "jfx_jcef")
|
||||
cat modules.list > modules_tmp.list
|
||||
;;
|
||||
*)
|
||||
cat modules.list > modules_tmp.list
|
||||
;;
|
||||
esac
|
||||
rm -rf ${JBR_BUNDLE}
|
||||
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output ${JBR_BUNDLE} || exit $?
|
||||
if [[ "${bundle_type}" == *jcef* ]]
|
||||
then
|
||||
cp -R jcef_win_x64/* ${JBR_BUNDLE}/bin
|
||||
fi
|
||||
echo Modifying release info ...
|
||||
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${JBR_BUNDLE}/release
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WORK_DIR=$(pwd)
|
||||
|
||||
#git checkout -- modules.list src
|
||||
case "$bundle_type" in
|
||||
"jfx")
|
||||
echo "Excluding jcef modules"
|
||||
git apply -p0 < jb/project/tools/exclude_jcef_module.patch
|
||||
;;
|
||||
"jcef")
|
||||
echo "Excluding jfx modules"
|
||||
git apply -p0 < jb/project/tools/exclude_jfx_module.patch
|
||||
;;
|
||||
esac
|
||||
|
||||
PATH="/usr/local/bin:/usr/bin:${PATH}"
|
||||
|
||||
if [ -z "$bundle_type" ]; then
|
||||
bash ./configure \
|
||||
--disable-warnings-as-errors \
|
||||
--with-target-bits=64 \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-toolchain-version=${TOOLCHAIN_VERSION} \
|
||||
--with-boot-jdk=${BOOT_JDK} \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes || exit 1
|
||||
else
|
||||
bash ./configure \
|
||||
--disable-warnings-as-errors \
|
||||
--with-target-bits=64 \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-import-modules=${WORK_DIR}/modular-sdk \
|
||||
--with-toolchain-version=${TOOLCHAIN_VERSION} \
|
||||
--with-boot-jdk=${BOOT_JDK} \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes || exit 1
|
||||
fi
|
||||
|
||||
if [[ "$bundle_type" == "jfx_jcef" || -z "$bundle_type" ]]; then
|
||||
make LOG=info images CONF=windows-x86_64-server-release test-image || exit 1
|
||||
else
|
||||
make LOG=info images CONF=windows-x86_64-server-release || exit 1
|
||||
fi
|
||||
|
||||
JSDK=build/windows-x86_64-server-release/images/jdk
|
||||
if [[ "$bundle_type" == "*jcef*" || -z "$bundle_type" ]]; then
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-b${build_number}
|
||||
fi
|
||||
BASE_DIR=build/windows-x86_64-server-release/images
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || exit 1
|
||||
if [[ "$bundle_type" == "*jcef*" ]]; then
|
||||
cp -R jcef_win_x64/* ${JBRSDK_BUNDLE}/bin
|
||||
fi
|
||||
|
||||
if [ -z "$bundle_type" ]; then
|
||||
JBR_BUNDLE=jbr
|
||||
else
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
fi
|
||||
create_jbr ${bundle_type}
|
||||
|
||||
#JBR_BUNDLE=jbr_${bundle_type}_lw
|
||||
#create_jbr ${bundle_type}_lw
|
||||
@@ -1,57 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WORK_DIR=$(pwd)
|
||||
|
||||
PATH="/usr/local/bin:/usr/bin:${PATH}"
|
||||
./configure \
|
||||
--disable-warnings-as-errors \
|
||||
--disable-debug-symbols \
|
||||
--with-target-bits=32 \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-toolchain-version=2015 \
|
||||
--with-boot-jdk=${BOOT_JDK} \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes || exit 1
|
||||
make clean CONF=windows-x86-normal-server-release || exit 1
|
||||
make LOG=info images CONF=windows-x86-normal-server-release test-image || exit 1
|
||||
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-x86-b${build_number}
|
||||
BASE_DIR=build/windows-x86-normal-server-release/images
|
||||
JSDK=${BASE_DIR}/jdk
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || exit 1
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
rm -rf ${JBR_BUNDLE}
|
||||
grep -v javafx modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.x86
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list.x86 | sed s/" "//g) --output ${JBR_BUNDLE} || exit $?
|
||||
|
||||
echo Modifying release info ...
|
||||
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${JBR_BUNDLE}/release
|
||||
@@ -1,79 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
|
||||
function pack_jbr {
|
||||
|
||||
case "$1" in
|
||||
"${bundle_type}_lw")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}_lw-${JBSDK_VERSION}
|
||||
;;
|
||||
"jfx" | "jcef")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
|
||||
;;
|
||||
"jfx_jcef" | "")
|
||||
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
JBR=$JBR_BASE_NAME-windows-x64-b$build_number
|
||||
echo Creating $JBR.tar.gz ...
|
||||
if [ ! -z "$bundle_type" ]; then
|
||||
rm -rf ${BASE_DIR}/jbr
|
||||
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
|
||||
fi
|
||||
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR jbr || exit 1
|
||||
#rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
|
||||
IMAGES_DIR=build/windows-x86_64-server-release/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JBSDK=$JBRSDK_BASE_NAME-windows-x64-b$build_number
|
||||
BASE_DIR=.
|
||||
|
||||
if [ -z "$bundle_type" ]; then
|
||||
JBR_BUNDLE=jbr
|
||||
else
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
fi
|
||||
if [[ "$bundle_type" == "jfx_jcef" || -z "$bundle_type" ]]; then
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || exit 1
|
||||
fi
|
||||
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
pack_jbr $bundle_type
|
||||
|
||||
if [[ "$bundle_type" == "jfx_jcef" || -z "$bundle_type" ]]; then
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-windows-test-x64-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || exit 1
|
||||
fi
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
|
||||
IMAGES_DIR=build/windows-x86-normal-server-release/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JBSDK=$JBRSDK_BASE_NAME-windows-x86-b$build_number
|
||||
BASE_DIR=.
|
||||
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || exit 1
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
|
||||
|
||||
JBR=$JBR_BASE_NAME-windows-x86-b$build_number
|
||||
echo Creating $JBR.tar.gz ...
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR ${JBR_BUNDLE} || exit 1
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-windows-test-x86-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || exit 1
|
||||
@@ -101,7 +101,7 @@ define SetupBundleFileBody
|
||||
# If no subdir is specified and only one BASE_DIR, tar.gz can be done
|
||||
# directly from BASE_DIR.
|
||||
$(CD) $$($1_BASE_DIRS) \
|
||||
&& ( $(TAR) cf - \
|
||||
&& ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
|
||||
-$(TAR_INCLUDE_PARAM) $$($1_$$($1_BASE_DIRS)_LIST_FILE) \
|
||||
$(TAR_IGNORE_EXIT_VALUE) ) \
|
||||
| $(GZIP) > $$@
|
||||
@@ -110,7 +110,7 @@ define SetupBundleFileBody
|
||||
# If only one BASE_DIR, but with a SUBDIR set, tar.gz can use the
|
||||
# transform option to create bundle directly from the BASE_DIR.
|
||||
$(CD) $$($1_BASE_DIRS) \
|
||||
&& ( $(TAR) cf - \
|
||||
&& ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
|
||||
-$(TAR_INCLUDE_PARAM) $$($1_$$($1_BASE_DIRS)_LIST_FILE) \
|
||||
$$(if $$($1_SUBDIR), --transform 's|^|$$($1_SUBDIR)/|S') \
|
||||
$(TAR_IGNORE_EXIT_VALUE) ) \
|
||||
@@ -140,7 +140,7 @@ define SetupBundleFileBody
|
||||
endif
|
||||
ifeq ($$($1_TYPE), tar.gz)
|
||||
$(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && \
|
||||
( $(TAR) cf - \
|
||||
( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
|
||||
$$(if $$($1_SUBDIR), $$($1_SUBDIR), .) $(TAR_IGNORE_EXIT_VALUE) ) \
|
||||
| $(GZIP) > $$@
|
||||
else ifeq ($$($1_TYPE), zip)
|
||||
|
||||
@@ -33,6 +33,7 @@ include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include NativeCompilation.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
include TextFileProcessing.gmk
|
||||
include ZipArchive.gmk
|
||||
|
||||
@@ -92,6 +93,7 @@ COPY_TO_IMAGE := *.html *.txt *.png *.xml README*
|
||||
# EXTRA_COPY_TO_IMAGE Additional files to copy to images (as wildcards)
|
||||
# EXTRA_MANIFEST_ATTR Extra manifest attribute
|
||||
# SKIP_COMPILATION Skip Java compilation iff true
|
||||
# DISABLE_SJAVAC Passed to SetupJavaCompilation
|
||||
# DISABLED_WARNINGS Additional disabled warnings
|
||||
SetupBuildDemo = $(NamedParamsMacroTemplate)
|
||||
define SetupBuildDemoBody
|
||||
@@ -124,7 +126,7 @@ define SetupBuildDemoBody
|
||||
|
||||
ifneq ($$($1_SKIP_COMPILATION), true)
|
||||
$$(eval $$(call SetupJavaCompilation, BUILD_DEMO_$1, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
|
||||
SETUP := GENERATE_USINGJDKBYTECODE, \
|
||||
SRC := $$($1_MAIN_SRC) $$($1_EXTRA_SRC_DIR), \
|
||||
BIN := $(SUPPORT_OUTPUTDIR)/demos/classes/$$($1_DEMO_SUBDIR)/$1, \
|
||||
COPY := $(COPY_TO_JAR) $$($1_EXTRA_COPY_TO_JAR), \
|
||||
@@ -135,6 +137,7 @@ define SetupBuildDemoBody
|
||||
SRCZIP := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1/src.zip, \
|
||||
EXCLUDE_FILES := $$($1_EXCLUDE_FILES), \
|
||||
DISABLED_WARNINGS := $$($1_DISABLED_WARNINGS), \
|
||||
DISABLE_SJAVAC := $$($1_DISABLE_SJAVAC), \
|
||||
))
|
||||
|
||||
$1 += $$(BUILD_DEMO_$1)
|
||||
@@ -180,6 +183,7 @@ $(eval $(call SetupBuildDemo, SwingSet2, \
|
||||
EXTRA_COPY_TO_JAR := .java, \
|
||||
EXTRA_MANIFEST_ATTR := SplashScreen-Image: resources/images/splash.png, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked static serial cast, \
|
||||
DISABLE_SJAVAC := true, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, Font2DTest, \
|
||||
@@ -240,9 +244,15 @@ $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%: $(DEMO_SHARE_SRC)/nbproject/%
|
||||
$(call install-file)
|
||||
$(CHMOD) -f ug+w $@
|
||||
|
||||
TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
|
||||
$(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \
|
||||
$(call FindFiles, $(DEMO_SHARE_SRC)/nbproject))
|
||||
ifeq ($(call isTargetOs, solaris), true)
|
||||
TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
|
||||
$(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \
|
||||
$(call FindFiles, $(DEMO_SHARE_SRC)/nbproject))
|
||||
else
|
||||
TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
|
||||
$(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \
|
||||
$(call FindFiles, $(DEMO_SHARE_SRC)/nbproject))
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ default: all
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
include Modules.gmk
|
||||
|
||||
################################################################################
|
||||
@@ -65,8 +66,8 @@ TARGETS += $(COPY_PREVIEW_FEATURES)
|
||||
# Param 1 - Name of module to compile
|
||||
define SetupInterimModule
|
||||
$$(eval $$(call SetupJavaCompilation, BUILD_$1.interim, \
|
||||
COMPILER := bootjdk, \
|
||||
TARGET_RELEASE := $$(TARGET_RELEASE_BOOTJDK), \
|
||||
SETUP := BOOT_JAVAC, \
|
||||
DISABLE_SJAVAC := true, \
|
||||
SRC := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim \
|
||||
$$(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$1) \
|
||||
$(TOPDIR)/src/$1/share/classes, \
|
||||
@@ -76,9 +77,8 @@ define SetupInterimModule
|
||||
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java, \
|
||||
COPY := .gif .png .xml .css .js javax.tools.JavaCompilerTool, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules/$1.interim, \
|
||||
DISABLED_WARNINGS := module options, \
|
||||
JAVAC_FLAGS := \
|
||||
--module-path $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules \
|
||||
DISABLED_WARNINGS := module, \
|
||||
ADD_JAVAC_FLAGS := --module-path $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules \
|
||||
$$(INTERIM_LANGTOOLS_ADD_EXPORTS) \
|
||||
--patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim \
|
||||
--add-exports java.base/jdk.internal=java.compiler.interim \
|
||||
|
||||
@@ -30,6 +30,7 @@ include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include Modules.gmk
|
||||
include JavaCompilation.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, CompileJavaModules.gmk))
|
||||
@@ -37,11 +38,8 @@ $(eval $(call IncludeCustomExtension, CompileJavaModules.gmk))
|
||||
################################################################################
|
||||
# Module specific build settings
|
||||
|
||||
java.base_DOCLINT += -Xdoclint:all/protected,-reference,-accessibility \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
java.base_JAVAC_FLAGS += -XDstringConcat=inline
|
||||
java.base_COPY += .icu .dat .spp .nrm content-types.properties \
|
||||
hijrah-config-Hijrah-umalqura_islamic-umalqura.properties
|
||||
java.base_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference,-accessibility '-Xdoclint/package:java.*,javax.*' -XDstringConcat=inline
|
||||
java.base_COPY += .icu .dat .spp .nrm content-types.properties hijrah-config-Hijrah-umalqura_islamic-umalqura.properties
|
||||
java.base_CLEAN += intrinsic.properties
|
||||
|
||||
java.base_EXCLUDE_FILES += \
|
||||
@@ -53,7 +51,14 @@ java.base_EXCLUDES += java/lang/doc-files
|
||||
# data files and shouldn't go in the product
|
||||
java.base_EXCLUDE_FILES += sun/text/resources/BreakIteratorRules.java
|
||||
|
||||
ifeq ($(call isTargetOs, macosx aix), false)
|
||||
ifeq ($(call isTargetOs, solaris), false)
|
||||
java.base_EXCLUDE_FILES += \
|
||||
SolarisLoginModule.java \
|
||||
SolarisSystem.java \
|
||||
#
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, solaris macosx aix), false)
|
||||
java.base_EXCLUDE_FILES += sun/nio/fs/PollingWatchService.java
|
||||
endif
|
||||
|
||||
@@ -65,19 +70,18 @@ endif
|
||||
|
||||
################################################################################
|
||||
|
||||
java.compiler_DOCLINT += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
java.compiler_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
|
||||
|
||||
################################################################################
|
||||
|
||||
java.datatransfer_DOCLINT += -Xdoclint:all/protected,-reference \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
java.datatransfer_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*'
|
||||
java.datatransfer_COPY += flavormap.properties
|
||||
|
||||
################################################################################
|
||||
|
||||
java.desktop_DOCLINT += -Xdoclint:all/protected,-reference \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
java.desktop_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference \
|
||||
'-Xdoclint/package:java.*,javax.*' \
|
||||
--doclint-format html4
|
||||
java.desktop_COPY += .gif .png .wav .txt .xml .css .pf
|
||||
java.desktop_CLEAN += iio-plugin.properties cursors.properties
|
||||
|
||||
@@ -210,89 +214,75 @@ java.desktop_EXCLUDE_FILES += \
|
||||
|
||||
################################################################################
|
||||
|
||||
java.scripting_DOCLINT += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
java.scripting_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
|
||||
java.scripting_COPY += .js
|
||||
java.scripting_CLEAN += .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
java.instrument_DOCLINT += -Xdoclint:all/protected,-accessibility \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
java.instrument_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*'
|
||||
|
||||
################################################################################
|
||||
|
||||
java.logging_DOCLINT += -Xdoclint:all/protected,-reference,-accessibility \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
java.logging_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference,-accessibility '-Xdoclint/package:java.*,javax.*'
|
||||
|
||||
################################################################################
|
||||
|
||||
java.management_DOCLINT += -Xdoclint:all/protected,-reference,-accessibility \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
java.management_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference,-accessibility '-Xdoclint/package:java.*,javax.*'
|
||||
|
||||
################################################################################
|
||||
|
||||
java.management.rmi_DOCLINT += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:javax.*'
|
||||
java.management.rmi_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:javax.*'
|
||||
|
||||
################################################################################
|
||||
|
||||
java.prefs_DOCLINT += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
java.prefs_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
|
||||
|
||||
################################################################################
|
||||
|
||||
java.transaction.xa_DOCLINT += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:javax.*'
|
||||
java.transaction.xa_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:javax.*'
|
||||
|
||||
################################################################################
|
||||
|
||||
java.sql_DOCLINT += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
java.sql_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
|
||||
|
||||
################################################################################
|
||||
|
||||
java.sql.rowset_DOCLINT += -Xdoclint:all/protected,-accessibility \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
java.sql.rowset_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*'
|
||||
java.sql.rowset_CLEAN_FILES += $(wildcard \
|
||||
$(TOPDIR)/src/java.sql.rowset/share/classes/com/sun/rowset/*.properties \
|
||||
$(TOPDIR)/src/java.sql.rowset/share/classes/javax/sql/rowset/*.properties)
|
||||
|
||||
################################################################################
|
||||
|
||||
java.rmi_DOCLINT += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
java.rmi_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
|
||||
java.rmi_CLEAN_FILES += $(wildcard \
|
||||
$(TOPDIR)/src/java.rmi/share/classes/sun/rmi/registry/resources/*.properties \
|
||||
$(TOPDIR)/src/java.rmi/share/classes/sun/rmi/server/resources/*.properties)
|
||||
|
||||
################################################################################
|
||||
|
||||
java.xml_DOCLINT += -Xdoclint:all/protected,-accessibility \
|
||||
java.xml_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility \
|
||||
'-Xdoclint/package:$(call CommaList, javax.xml.catalog javax.xml.datatype \
|
||||
javax.xml.transform javax.xml.validation javax.xml.xpath)'
|
||||
java.xml_CLEAN += .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
java.naming_DOCLINT += -Xdoclint:all/protected,-accessibility \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
java.naming_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*'
|
||||
java.naming_CLEAN += jndiprovider.properties
|
||||
|
||||
################################################################################
|
||||
|
||||
java.security.jgss_DOCLINT += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
java.security.jgss_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
|
||||
|
||||
################################################################################
|
||||
|
||||
java.smartcardio_DOCLINT += -Xdoclint:all/protected,-accessibility \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
java.smartcardio_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*'
|
||||
|
||||
################################################################################
|
||||
|
||||
java.xml.crypto_DOCLINT += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
java.xml.crypto_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
|
||||
java.xml.crypto_COPY += .dtd .xml
|
||||
java.xml.crypto_CLEAN += .properties
|
||||
|
||||
@@ -304,18 +294,18 @@ jdk.charsets_COPY += .dat
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.compiler_DOCLINT += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:-com.sun.tools.*,-jdk.internal.*,sun.tools.serialver.resources.*'
|
||||
jdk.compiler_JAVAC_FLAGS += -XDstringConcat=inline
|
||||
jdk.compiler_ADD_JAVAC_FLAGS += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:-com.sun.tools.*,-jdk.internal.*,sun.tools.serialver.resources.*' \
|
||||
-XDstringConcat=inline
|
||||
jdk.compiler_CLEAN_FILES += $(wildcard \
|
||||
$(patsubst %, $(TOPDIR)/src/jdk.compiler/share/classes/%/*.properties, \
|
||||
sun/tools/serialver/resources))
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.hotspot.agent_DISABLED_WARNINGS += rawtypes serial cast static overrides \
|
||||
fallthrough
|
||||
jdk.hotspot.agent_COPY += .gif .png .properties
|
||||
jdk.hotspot.agent_DISABLED_WARNINGS += deprecation rawtypes serial unchecked \
|
||||
cast static overrides fallthrough
|
||||
jdk.hotspot.agent_COPY += .gif .png sa.js .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -347,7 +337,22 @@ jdk.javadoc_COPY += .xml .css .js .png
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.jartool_JAVAC_FLAGS += -XDstringConcat=inline
|
||||
jdk.jartool_ADD_JAVAC_FLAGS += -XDstringConcat=inline
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.scripting.nashorn_DISABLED_WARNINGS += removal
|
||||
jdk.scripting.nashorn_COPY := .properties .js
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.scripting.nashorn.shell_DISABLED_WARNINGS += removal
|
||||
jdk.scripting.nashorn.shell_COPY += .js .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.rmic_DISABLED_WARNINGS += deprecation
|
||||
jdk.rmic_CLEAN += .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -375,9 +380,8 @@ endif
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.incubator.jpackage_COPY += .gif .png .txt .spec .script .prerm .preinst \
|
||||
.postrm .postinst .list .sh .desktop .copyright .control .plist .template \
|
||||
.icns .scpt .wxs .wxl .wxi .ico .bmp .tiff
|
||||
jdk.incubator.jpackage_COPY += .gif .png .txt .spec .script .prerm .preinst .postrm .postinst .list .sh \
|
||||
.desktop .copyright .control .plist .template .icns .scpt .entitlements .wxs .wxl .wxi .ico .bmp .tiff
|
||||
|
||||
jdk.incubator.jpackage_CLEAN += .properties
|
||||
|
||||
@@ -427,11 +431,11 @@ jdk.internal.jvmstat_COPY += aliasmap
|
||||
# The exports are needed since JVMCI is dynamically exported (see
|
||||
# jdk.vm.ci.services.internal.ReflectionAccessJDK::openJVMCITo).
|
||||
|
||||
jdk.internal.vm.ci_JAVAC_FLAGS += -parameters -XDstringConcat=inline
|
||||
jdk.internal.vm.ci_ADD_JAVAC_FLAGS += -parameters -XDstringConcat=inline
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.internal.vm.compiler_JAVAC_FLAGS += -parameters -XDstringConcat=inline \
|
||||
jdk.internal.vm.compiler_ADD_JAVAC_FLAGS += -parameters -XDstringConcat=inline \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.internal.vm.compiler \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.internal.vm.compiler \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.code=jdk.internal.vm.compiler \
|
||||
@@ -441,8 +445,10 @@ jdk.internal.vm.compiler_JAVAC_FLAGS += -parameters -XDstringConcat=inline \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot=jdk.internal.vm.compiler \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=jdk.internal.vm.compiler \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=jdk.internal.vm.compiler \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=jdk.internal.vm.compiler \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.meta=jdk.internal.vm.compiler \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.runtime=jdk.internal.vm.compiler \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.sparc=jdk.internal.vm.compiler \
|
||||
#
|
||||
|
||||
jdk.internal.vm.compiler_EXCLUDES += \
|
||||
@@ -452,6 +458,7 @@ jdk.internal.vm.compiler_EXCLUDES += \
|
||||
org.graalvm.compiler.api.test \
|
||||
org.graalvm.compiler.asm.aarch64.test \
|
||||
org.graalvm.compiler.asm.amd64.test \
|
||||
org.graalvm.compiler.asm.sparc.test \
|
||||
org.graalvm.compiler.asm.test \
|
||||
org.graalvm.compiler.core.aarch64.test \
|
||||
org.graalvm.compiler.core.amd64.test \
|
||||
@@ -462,9 +469,9 @@ jdk.internal.vm.compiler_EXCLUDES += \
|
||||
org.graalvm.compiler.graph.test \
|
||||
org.graalvm.compiler.hotspot.aarch64.test \
|
||||
org.graalvm.compiler.hotspot.amd64.test \
|
||||
org.graalvm.compiler.hotspot.jdk15.test \
|
||||
org.graalvm.compiler.hotspot.jdk9.test \
|
||||
org.graalvm.compiler.hotspot.lir.test \
|
||||
org.graalvm.compiler.hotspot.sparc.test \
|
||||
org.graalvm.compiler.hotspot.test \
|
||||
org.graalvm.compiler.jtt \
|
||||
org.graalvm.compiler.lir.jtt \
|
||||
@@ -496,7 +503,7 @@ jdk.internal.vm.compiler_EXCLUDES += \
|
||||
# The exports are needed since JVMCI is dynamically exported (see
|
||||
# jdk.vm.ci.services.internal.ReflectionAccessJDK::openJVMCITo).
|
||||
|
||||
jdk.aot_JAVAC_FLAGS += -parameters -XDstringConcat=inline \
|
||||
jdk.aot_ADD_JAVAC_FLAGS += -parameters -XDstringConcat=inline \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.internal.vm.compiler,jdk.aot \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.internal.vm.compiler,jdk.aot \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.code=jdk.internal.vm.compiler,jdk.aot \
|
||||
@@ -506,8 +513,10 @@ jdk.aot_JAVAC_FLAGS += -parameters -XDstringConcat=inline \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot=jdk.internal.vm.compiler,jdk.aot \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=jdk.internal.vm.compiler,jdk.aot \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=jdk.internal.vm.compiler,jdk.aot \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=jdk.internal.vm.compiler,jdk.aot \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.meta=jdk.internal.vm.compiler,jdk.aot \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.runtime=jdk.internal.vm.compiler,jdk.aot \
|
||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.sparc=jdk.internal.vm.compiler,jdk.aot \
|
||||
#
|
||||
|
||||
jdk.aot_EXCLUDES += \
|
||||
@@ -529,7 +538,7 @@ jdk.localedata_KEEP_ALL_TRANSLATIONS := true
|
||||
|
||||
jdk.jfr_DISABLED_WARNINGS += exports
|
||||
jdk.jfr_COPY := .xsd .xml .dtd
|
||||
jdk.jfr_JAVAC_FLAGS := -XDstringConcat=inline
|
||||
jdk.jfr_ADD_JAVAC_FLAGS := -XDstringConcat=inline
|
||||
|
||||
################################################################################
|
||||
# If this is an imported module that has prebuilt classes, only compile
|
||||
@@ -592,7 +601,7 @@ ifeq ($(MODULE), jdk.aot)
|
||||
endif
|
||||
|
||||
$(eval $(call SetupJavaCompilation, $(MODULE), \
|
||||
SMALL_JAVA := false, \
|
||||
SETUP := $(if $($(MODULE)_SETUP), $($(MODULE)_SETUP), GENERATE_JDKBYTECODE), \
|
||||
MODULE := $(MODULE), \
|
||||
SRC := $(wildcard $(MODULE_SRC_DIRS)), \
|
||||
INCLUDES := $(JDK_USER_DEFINED_FILTER), \
|
||||
@@ -600,9 +609,8 @@ $(eval $(call SetupJavaCompilation, $(MODULE), \
|
||||
BIN := $(if $($(MODULE)_BIN), $($(MODULE)_BIN), $(JDK_OUTPUTDIR)/modules), \
|
||||
HEADERS := $(SUPPORT_OUTPUTDIR)/headers, \
|
||||
CREATE_API_DIGEST := true, \
|
||||
JAVAC_FLAGS := \
|
||||
$($(MODULE)_DOCLINT) \
|
||||
$($(MODULE)_JAVAC_FLAGS) \
|
||||
ADD_JAVAC_FLAGS := \
|
||||
$($(MODULE)_ADD_JAVAC_FLAGS) \
|
||||
--module-source-path $(MODULESOURCEPATH) \
|
||||
--module-path $(MODULEPATH) \
|
||||
--system none, \
|
||||
@@ -665,6 +673,12 @@ endif
|
||||
|
||||
################################################################################
|
||||
|
||||
ifeq ($(MODULE), jdk.scripting.nashorn)
|
||||
include CompileJavaModulesNashorn.gmk
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call IncludeCustomExtension, CompileJavaModules-post.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
54
make/CompileJavaModulesNashorn.gmk
Normal file
54
make/CompileJavaModulesNashorn.gmk
Normal file
@@ -0,0 +1,54 @@
|
||||
#
|
||||
# Copyright (c) 2010, 2018, 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.
|
||||
#
|
||||
|
||||
NASGEN_SRC := $(TOPDIR)/make/nashorn/buildtools/nasgen/src
|
||||
ASM_SRC := $(TOPDIR)/src/java.base/share/classes/jdk/internal/org/objectweb/asm
|
||||
|
||||
# Build nasgen
|
||||
$(eval $(call SetupJavaCompilation, BUILD_NASGEN, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := $(NASGEN_SRC) $(ASM_SRC), \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/nasgen_classes, \
|
||||
))
|
||||
|
||||
NASHORN_CLASSES_DIR := $(JDK_OUTPUTDIR)/modules/$(MODULE)
|
||||
NASGEN_RUN_FILE := $(NASHORN_CLASSES_DIR)/_the.nasgen.run
|
||||
|
||||
NASGEN_OPTIONS := \
|
||||
-cp $(BUILDTOOLS_OUTPUTDIR)/nasgen_classes \
|
||||
--patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/nasgen_classes \
|
||||
--add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED \
|
||||
#
|
||||
|
||||
# Run nasgen to modify classes in jdk.nashorn.internal.objects package
|
||||
$(NASGEN_RUN_FILE): $(BUILD_NASGEN) $($(MODULE))
|
||||
$(ECHO) Running nasgen
|
||||
$(JAVA_SMALL) $(NASGEN_OPTIONS) \
|
||||
jdk.nashorn.internal.tools.nasgen.Main $(@D) \
|
||||
jdk.nashorn.internal.objects $(@D)
|
||||
$(TOUCH) $@
|
||||
|
||||
TARGETS += $(NASGEN_RUN_FILE)
|
||||
@@ -28,13 +28,14 @@ default: all
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes
|
||||
|
||||
$(eval $(call SetupJavaCompilation, BUILD_JIGSAW_TOOLS, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
|
||||
$(eval $(call SetupJavaCompilation,BUILD_JIGSAW_TOOLS, \
|
||||
SETUP := GENERATE_USINGJDKBYTECODE, \
|
||||
SRC := $(TOPDIR)/make/jdk/src/classes, \
|
||||
INCLUDES := build/tools/deps \
|
||||
build/tools/docs \
|
||||
@@ -42,10 +43,10 @@ $(eval $(call SetupJavaCompilation, BUILD_JIGSAW_TOOLS, \
|
||||
COPY := .properties .html, \
|
||||
BIN := $(TOOLS_CLASSES_DIR), \
|
||||
DISABLED_WARNINGS := fallthrough, \
|
||||
JAVAC_FLAGS := \
|
||||
ADD_JAVAC_FLAGS := \
|
||||
--add-modules jdk.jdeps \
|
||||
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \
|
||||
--add-exports jdk.jdeps/com.sun.tools.jdeps=ALL-UNNAMED, \
|
||||
--add-exports jdk.jdeps/com.sun.tools.jdeps=ALL-UNNAMED \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_JIGSAW_TOOLS)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2018, 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
|
||||
@@ -30,6 +30,7 @@ include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include JavaCompilation.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
|
||||
TARGETS :=
|
||||
|
||||
@@ -44,7 +45,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
||||
##############################################################################
|
||||
# Compile the annotation processors
|
||||
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_MATCH_PROCESSOR, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := \
|
||||
$(SRC_DIR)/org.graalvm.compiler.processor/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.core.match.processor/src \
|
||||
@@ -52,7 +53,6 @@ ifeq ($(INCLUDE_GRAAL), true)
|
||||
EXCLUDE_FILES := $(EXCLUDE_FILES), \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.match.processor, \
|
||||
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.match.processor.jar, \
|
||||
DISABLED_WARNINGS := options, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_VM_COMPILER_MATCH_PROCESSOR)
|
||||
@@ -60,14 +60,13 @@ ifeq ($(INCLUDE_GRAAL), true)
|
||||
##############################################################################
|
||||
|
||||
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_NODEINFO_PROCESSOR, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := \
|
||||
$(SRC_DIR)/org.graalvm.compiler.processor/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.nodeinfo.processor/src \
|
||||
, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.nodeinfo.processor, \
|
||||
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.nodeinfo.processor.jar, \
|
||||
DISABLED_WARNINGS := options, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_VM_COMPILER_NODEINFO_PROCESSOR)
|
||||
@@ -75,8 +74,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
||||
##############################################################################
|
||||
|
||||
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_OPTIONS_PROCESSOR, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||
DISABLED_WARNINGS := options, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := \
|
||||
$(SRC_DIR)/org.graalvm.compiler.processor/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.options.processor/src \
|
||||
@@ -90,7 +88,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
||||
##############################################################################
|
||||
|
||||
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_REPLACEMENTS_PROCESSOR, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := \
|
||||
$(SRC_DIR)/org.graalvm.compiler.processor/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.replacements.processor/src \
|
||||
@@ -98,7 +96,6 @@ ifeq ($(INCLUDE_GRAAL), true)
|
||||
EXCLUDE_FILES := $(EXCLUDE_FILES), \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier, \
|
||||
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier.jar, \
|
||||
DISABLED_WARNINGS := options, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_VM_COMPILER_REPLACEMENTS_PROCESSOR)
|
||||
@@ -106,7 +103,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
||||
##############################################################################
|
||||
|
||||
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_SERVICEPROVIDER_PROCESSOR, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := \
|
||||
$(SRC_DIR)/org.graalvm.compiler.processor/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.serviceprovider.processor/src \
|
||||
@@ -114,7 +111,6 @@ ifeq ($(INCLUDE_GRAAL), true)
|
||||
EXCLUDE_FILES := $(EXCLUDE_FILES), \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.serviceprovider.processor, \
|
||||
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.serviceprovider.processor.jar, \
|
||||
DISABLED_WARNINGS := options, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_VM_COMPILER_SERVICEPROVIDER_PROCESSOR)
|
||||
|
||||
@@ -28,6 +28,7 @@ default: all
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
include TextFileProcessing.gmk
|
||||
|
||||
################################################################################
|
||||
@@ -42,8 +43,8 @@ BUILD_TOOLS_SRC_DIRS += \
|
||||
$(BUILDTOOLS_OUTPUTDIR)/interim_tzdb_classes \
|
||||
#
|
||||
|
||||
$(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||
$(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := $(BUILD_TOOLS_SRC_DIRS), \
|
||||
EXCLUDES := \
|
||||
build/tools/classlist \
|
||||
@@ -52,11 +53,12 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
|
||||
build/tools/jigsaw \
|
||||
build/tools/depend \
|
||||
, \
|
||||
DISABLED_WARNINGS := unchecked rawtypes deprecation cast, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
|
||||
DISABLED_WARNINGS := options, \
|
||||
JAVAC_FLAGS := \
|
||||
ADD_JAVAC_FLAGS := \
|
||||
--add-exports java.desktop/sun.awt=ALL-UNNAMED \
|
||||
--add-exports java.base/sun.text=ALL-UNNAMED, \
|
||||
--add-exports java.base/sun.text=ALL-UNNAMED \
|
||||
, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_TOOLS_JDK)
|
||||
@@ -71,11 +73,10 @@ TARGETS += $(COPY_NIMBUS_TEMPLATES)
|
||||
################################################################################
|
||||
|
||||
$(eval $(call SetupJavaCompilation, COMPILE_DEPEND, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := $(TOPDIR)/make/jdk/src/classes, \
|
||||
INCLUDES := build/tools/depend, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/depend, \
|
||||
DISABLED_WARNINGS := options, \
|
||||
))
|
||||
|
||||
DEPEND_SERVICE_PROVIDER := $(BUILDTOOLS_OUTPUTDIR)/depend/META-INF/services/com.sun.source.util.Plugin
|
||||
@@ -103,8 +104,9 @@ ifeq ($(ENABLE_PANDOC), true)
|
||||
SOURCE_FILES := $(TOPDIR)/make/scripts/pandoc-troff-manpage-filter.sh.template, \
|
||||
OUTPUT_FILE := $(PANDOC_TROFF_MANPAGE_FILTER), \
|
||||
REPLACEMENTS := \
|
||||
@@JJS@@ => $(JJS) ; \
|
||||
@@BOOT_JDK@@ => $(BOOT_JDK) ; \
|
||||
@@TOPDIR@@ => $(TOPDIR) ; \
|
||||
@@JJS_FLAGS@@ => $(addprefix -J, $(JAVA_FLAGS_SMALL)), \
|
||||
))
|
||||
|
||||
# Created script must be made executable
|
||||
@@ -126,8 +128,9 @@ ifeq ($(ENABLE_PANDOC), true)
|
||||
SOURCE_FILES := $(TOPDIR)/make/scripts/pandoc-html-manpage-filter.sh.template, \
|
||||
OUTPUT_FILE := $(PANDOC_HTML_MANPAGE_FILTER), \
|
||||
REPLACEMENTS := \
|
||||
@@JJS@@ => $(JJS) ; \
|
||||
@@BOOT_JDK@@ => $(BOOT_JDK) ; \
|
||||
@@TOPDIR@@ => $(TOPDIR) ; \
|
||||
@@JJS_FLAGS@@ => $(addprefix -J, $(JAVA_FLAGS_SMALL)), \
|
||||
))
|
||||
|
||||
# Created script must be made executable
|
||||
|
||||
@@ -177,11 +177,6 @@ else # not java.base
|
||||
JMOD_FLAGS += --exclude '$(notdir $(MSVCR_DLL))'
|
||||
endif
|
||||
endif
|
||||
ifneq ($(VCRUNTIME_1_DLL), )
|
||||
ifneq ($(wildcard $(LIBS_DIR)/$(notdir $(VCRUNTIME_1_DLL))), )
|
||||
JMOD_FLAGS += --exclude '$(notdir $(VCRUNTIME_1_DLL))'
|
||||
endif
|
||||
endif
|
||||
ifneq ($(MSVCP_DLL), )
|
||||
ifneq ($(wildcard $(LIBS_DIR)/$(notdir $(MSVCP_DLL))), )
|
||||
JMOD_FLAGS += --exclude '$(notdir $(MSVCP_DLL))'
|
||||
|
||||
@@ -31,14 +31,14 @@ default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
|
||||
################################################################################
|
||||
# Create a jar with our generator class. Using a jar is intentional since it
|
||||
# will load more classes
|
||||
|
||||
$(eval $(call SetupJavaCompilation, CLASSLIST_JAR, \
|
||||
SMALL_JAVA := false, \
|
||||
SETUP := GENERATE_JDKBYTECODE, \
|
||||
SRC := $(TOPDIR)/make/jdk/src/classes, \
|
||||
INCLUDES := build/tools/classlist, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/classlist_classes, \
|
||||
|
||||
@@ -85,8 +85,6 @@ ifeq ($(JLINK_KEEP_PACKAGED_MODULES), true)
|
||||
JLINK_JDK_EXTRA_OPTS := --keep-packaged-modules $(JDK_IMAGE_DIR)/jmods
|
||||
endif
|
||||
|
||||
JLINK_DISABLE_WARNINGS := | ( $(GREP) -v -e "WARNING: Using incubator module" || test "$$?" = "1" )
|
||||
|
||||
$(eval $(call SetupExecute, jlink_jdk, \
|
||||
WARN := Creating jdk image, \
|
||||
DEPS := $(JMODS) $(BASE_RELEASE_FILE) \
|
||||
@@ -95,8 +93,7 @@ $(eval $(call SetupExecute, jlink_jdk, \
|
||||
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk, \
|
||||
PRE_COMMAND := $(RM) -r $(JDK_IMAGE_DIR), \
|
||||
COMMAND := $(JLINK_TOOL) --add-modules $(JDK_MODULES_LIST) \
|
||||
$(JLINK_JDK_EXTRA_OPTS) --output $(JDK_IMAGE_DIR) \
|
||||
$(JLINK_DISABLE_WARNINGS), \
|
||||
$(JLINK_JDK_EXTRA_OPTS) --output $(JDK_IMAGE_DIR), \
|
||||
))
|
||||
|
||||
JLINK_JDK_TARGETS := $(jlink_jdk)
|
||||
@@ -117,10 +114,8 @@ JLINK_JRE_TARGETS := $(jlink_jre)
|
||||
ifeq ($(BUILD_CDS_ARCHIVE), true)
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
CDS_ARCHIVE := bin/server/classes.jsa
|
||||
CDS_NOCOOPS_ARCHIVE := bin/server/classes_nocoops.jsa
|
||||
else
|
||||
CDS_ARCHIVE := lib/server/classes.jsa
|
||||
CDS_NOCOOPS_ARCHIVE := lib/server/classes_nocoops.jsa
|
||||
endif
|
||||
|
||||
$(eval $(call SetupExecute, gen_cds_archive_jdk, \
|
||||
@@ -129,7 +124,6 @@ ifeq ($(BUILD_CDS_ARCHIVE), true)
|
||||
OUTPUT_FILE := $(JDK_IMAGE_DIR)/$(CDS_ARCHIVE), \
|
||||
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk, \
|
||||
COMMAND := $(FIXPATH) $(JDK_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-XX:SharedArchiveFile=$(JDK_IMAGE_DIR)/$(CDS_ARCHIVE) \
|
||||
-Xmx128M -Xms128M $(LOG_INFO), \
|
||||
))
|
||||
|
||||
@@ -141,40 +135,10 @@ ifeq ($(BUILD_CDS_ARCHIVE), true)
|
||||
OUTPUT_FILE := $(JRE_IMAGE_DIR)/$(CDS_ARCHIVE), \
|
||||
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre, \
|
||||
COMMAND := $(FIXPATH) $(JRE_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-XX:SharedArchiveFile=$(JRE_IMAGE_DIR)/$(CDS_ARCHIVE) \
|
||||
-Xmx128M -Xms128M $(LOG_INFO), \
|
||||
))
|
||||
|
||||
JRE_TARGETS += $(gen_cds_archive_jre)
|
||||
|
||||
ifeq ($(call isTargetCpuBits, 64), true)
|
||||
$(eval $(call SetupExecute, gen_cds_nocoops_archive_jdk, \
|
||||
WARN := Creating CDS-NOCOOPS archive for jdk image, \
|
||||
DEPS := $(jlink_jdk), \
|
||||
OUTPUT_FILE := $(JDK_IMAGE_DIR)/$(CDS_NOCOOPS_ARCHIVE), \
|
||||
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk, \
|
||||
COMMAND := $(FIXPATH) $(JDK_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-XX:SharedArchiveFile=$(JDK_IMAGE_DIR)/$(CDS_NOCOOPS_ARCHIVE) \
|
||||
-XX:-UseCompressedOops \
|
||||
-Xmx128M -Xms128M $(LOG_INFO), \
|
||||
))
|
||||
|
||||
JDK_TARGETS += $(gen_cds_nocoops_archive_jdk)
|
||||
|
||||
$(eval $(call SetupExecute, gen_cds_nocoops_archive_jre, \
|
||||
WARN := Creating CDS-NOCOOPS archive for jre image, \
|
||||
DEPS := $(jlink_jre), \
|
||||
OUTPUT_FILE := $(JRE_IMAGE_DIR)/$(CDS_NOCOOPS_ARCHIVE), \
|
||||
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre, \
|
||||
COMMAND := $(FIXPATH) $(JRE_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-XX:SharedArchiveFile=$(JRE_IMAGE_DIR)/$(CDS_NOCOOPS_ARCHIVE) \
|
||||
-XX:-UseCompressedOops \
|
||||
-Xmx128M -Xms128M $(LOG_INFO), \
|
||||
))
|
||||
|
||||
JRE_TARGETS += $(gen_cds_nocoops_archive_jre)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -226,9 +226,6 @@ else # HAS_SPEC=true
|
||||
# Parse COMPARE_BUILD (for makefile development)
|
||||
$(eval $(call ParseCompareBuild))
|
||||
|
||||
# Setup reproducible build environment
|
||||
$(eval $(call SetupReproducibleBuild))
|
||||
|
||||
# If no LOG= was given on command line, but we have a non-standard default
|
||||
# value, use that instead and re-parse log level.
|
||||
ifeq ($(LOG), )
|
||||
|
||||
@@ -306,15 +306,6 @@ else # $(HAS_SPEC)=true
|
||||
topdir=$(TOPDIR)
|
||||
endif
|
||||
|
||||
# Setup the build environment to match the requested specification on
|
||||
# level of reproducible builds
|
||||
define SetupReproducibleBuild
|
||||
ifeq ($$(SOURCE_DATE), updated)
|
||||
SOURCE_DATE := $$(shell $$(DATE) +"%s")
|
||||
endif
|
||||
export SOURCE_DATE_EPOCH := $$(SOURCE_DATE)
|
||||
endef
|
||||
|
||||
# Parse COMPARE_BUILD into COMPARE_BUILD_*
|
||||
# Syntax: COMPARE_BUILD=CONF=<configure options>:PATCH=<patch file>:
|
||||
# MAKE=<make targets>:COMP_OPTS=<compare script options>:
|
||||
@@ -480,15 +471,15 @@ else # $(HAS_SPEC)=true
|
||||
# Remove any javac server logs and port files. This
|
||||
# prevents a new make run to reuse the previous servers.
|
||||
define PrepareSmartJavac
|
||||
$(if $(JAVAC_SERVER_DIR), \
|
||||
$(RM) -r $(JAVAC_SERVER_DIR) 2> /dev/null && \
|
||||
$(MKDIR) -p $(JAVAC_SERVER_DIR) \
|
||||
$(if $(SJAVAC_SERVER_DIR), \
|
||||
$(RM) -r $(SJAVAC_SERVER_DIR) 2> /dev/null && \
|
||||
$(MKDIR) -p $(SJAVAC_SERVER_DIR) \
|
||||
)
|
||||
endef
|
||||
|
||||
define CleanupSmartJavac
|
||||
[ -f $(JAVAC_SERVER_DIR)/server.port ] && $(ECHO) Stopping sjavac server && \
|
||||
$(TOUCH) $(JAVAC_SERVER_DIR)/server.port.stop; true
|
||||
[ -f $(SJAVAC_SERVER_DIR)/server.port ] && $(ECHO) Stopping sjavac server && \
|
||||
$(TOUCH) $(SJAVAC_SERVER_DIR)/server.port.stop; true
|
||||
endef
|
||||
|
||||
ifeq ($(call isBuildOs, windows), true)
|
||||
@@ -497,7 +488,7 @@ else # $(HAS_SPEC)=true
|
||||
# synchronization process, wait for a while and hope it helps. This is only
|
||||
# used by build comparisons.
|
||||
define WaitForSmartJavacFinish
|
||||
$(if $(JAVAC_SERVER_DIR), \
|
||||
$(if $(SJAVAC_SERVER_DIR), \
|
||||
sleep 5\
|
||||
)
|
||||
endef
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2017, 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
|
||||
@@ -27,8 +27,8 @@ default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include JarArchive.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
include TextFileProcessing.gmk
|
||||
|
||||
# This rule will be depended on due to the MANIFEST line
|
||||
@@ -47,13 +47,11 @@ JIMAGE_PKGS := \
|
||||
#
|
||||
|
||||
$(eval $(call SetupJavaCompilation, BUILD_JRTFS, \
|
||||
COMPILER := bootjdk, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_JDK8), \
|
||||
SETUP := GENERATE_8_BYTECODE, \
|
||||
SRC := $(TOPDIR)/src/java.base/share/classes, \
|
||||
EXCLUDE_FILES := module-info.java, \
|
||||
INCLUDES := $(JIMAGE_PKGS), \
|
||||
BIN := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \
|
||||
))
|
||||
BIN := $(SUPPORT_OUTPUTDIR)/jrtfs_classes))
|
||||
|
||||
# Because of the explicit INCLUDES in the compilation setup above, the service provider
|
||||
# file will not be copied unless META-INF/services would also be added to the INCLUDES.
|
||||
@@ -64,7 +62,7 @@ $(eval $(call SetupCopyFiles, COPY_JIMAGE_SERVICE_PROVIDER, \
|
||||
DEST := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \
|
||||
FILES := META-INF/services/java.nio.file.spi.FileSystemProvider))
|
||||
|
||||
$(eval $(call SetupJarArchive, BUILD_JRTFS_JAR, \
|
||||
$(eval $(call SetupJarArchive,BUILD_JRTFS_JAR, \
|
||||
DEPENDENCIES := $(BUILD_JRTFS) $(COPY_JIMAGE_SERVICE_PROVIDER), \
|
||||
SRCS := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \
|
||||
JAR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jrt-fs.jar, \
|
||||
|
||||
678
make/Main.gmk
678
make/Main.gmk
@@ -38,18 +38,13 @@ endif
|
||||
# Now load the spec
|
||||
include $(SPEC)
|
||||
|
||||
include $(TOPDIR)/make/MainSupport.gmk
|
||||
|
||||
# Load the vital tools for all the makefiles.
|
||||
include $(TOPDIR)/make/common/MakeBase.gmk
|
||||
include $(TOPDIR)/make/common/Modules.gmk
|
||||
include $(TOPDIR)/make/common/FindTests.gmk
|
||||
|
||||
include $(TOPDIR)/make/MainSupport.gmk
|
||||
|
||||
# Are we requested to ignore dependencies?
|
||||
ifneq ($(findstring -only, $(MAKECMDGOALS)), )
|
||||
DEPS := none
|
||||
endif
|
||||
|
||||
# Declare ALL_TARGETS as an immediate variable. This variable is a list of all
|
||||
# valid top level targets. It's used to declare them all as PHONY and to
|
||||
# generate the -only targets.
|
||||
@@ -71,40 +66,36 @@ ALL_MODULES := $(call FindAllModules)
|
||||
################################################################################
|
||||
# Interim/build tools targets, compiling tools used during the build
|
||||
|
||||
$(eval $(call SetupTarget, buildtools-langtools, \
|
||||
MAKEFILE := ToolsLangtools, \
|
||||
))
|
||||
buildtools-langtools:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ToolsLangtools.gmk)
|
||||
|
||||
$(eval $(call SetupTarget, interim-langtools, \
|
||||
MAKEFILE := CompileInterimLangtools, \
|
||||
))
|
||||
interim-langtools:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimLangtools.gmk)
|
||||
|
||||
$(eval $(call SetupTarget, interim-tzdb, \
|
||||
MAKEFILE := CopyInterimTZDB, \
|
||||
))
|
||||
interim-tzdb:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimTZDB.gmk)
|
||||
|
||||
$(eval $(call SetupTarget, buildtools-jdk, \
|
||||
MAKEFILE := CompileToolsJdk, \
|
||||
DEPS := interim-langtools interim-tzdb, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTarget, buildtools-modules, \
|
||||
MAKEFILE := CompileModuleTools, \
|
||||
DEPS := exploded-image-base, \
|
||||
))
|
||||
buildtools-jdk:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileToolsJdk.gmk)
|
||||
|
||||
$(eval $(call SetupTarget, buildtools-hotspot, \
|
||||
MAKEFILE := CompileToolsHotspot, \
|
||||
DEPS := interim-langtools, \
|
||||
))
|
||||
buildtools-modules:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileModuleTools.gmk)
|
||||
|
||||
buildtools-hotspot:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileToolsHotspot.gmk)
|
||||
|
||||
ALL_TARGETS += buildtools-langtools interim-langtools \
|
||||
interim-tzdb buildtools-jdk buildtools-modules \
|
||||
buildtools-hotspot
|
||||
|
||||
################################################################################
|
||||
# Special targets for certain modules
|
||||
|
||||
$(eval $(call SetupTarget, generate-exported-symbols, \
|
||||
MAKEFILE := BuildStatic, \
|
||||
DEPS := java.base-libs jdk.jdwp.agent-libs, \
|
||||
))
|
||||
generate-exported-symbols:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f BuildStatic.gmk)
|
||||
|
||||
ALL_TARGETS += generate-exported-symbols
|
||||
|
||||
################################################################################
|
||||
# Gensrc targets, generating source before java compilation can be done
|
||||
@@ -136,7 +127,7 @@ GENSRC_TARGETS += $(sort $(GENSRC_MODULEINFO_TARGETS) \
|
||||
define DeclareModuleInfoRecipe
|
||||
$1-gensrc-moduleinfo:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
|
||||
-f common/modules/GensrcModuleInfo.gmk MODULE=$1)
|
||||
-f gensrc/GensrcModuleInfo.gmk MODULE=$1)
|
||||
|
||||
$1-gensrc: $1-gensrc-moduleinfo
|
||||
endef
|
||||
@@ -152,7 +143,7 @@ $(eval $(call DeclareRecipesForPhase, GENDATA, \
|
||||
FILE_PREFIX := Gendata, \
|
||||
MAKE_SUBDIR := gendata, \
|
||||
CHECK_MODULES := $(ALL_MODULES), \
|
||||
))
|
||||
USE_WRAPPER := true))
|
||||
|
||||
ALL_TARGETS += $(GENDATA_TARGETS)
|
||||
|
||||
@@ -163,6 +154,7 @@ $(eval $(call DeclareRecipesForPhase, COPY, \
|
||||
FILE_PREFIX := Copy, \
|
||||
MAKE_SUBDIR := copy, \
|
||||
CHECK_MODULES := $(ALL_MODULES), \
|
||||
USE_WRAPPER := true, \
|
||||
))
|
||||
|
||||
ALL_COPY_MODULES += $(COPY_MODULES)
|
||||
@@ -205,7 +197,7 @@ $(eval $(call DeclareRecipesForPhase, LIBS, \
|
||||
FILE_PREFIX := Lib, \
|
||||
MAKE_SUBDIR := lib, \
|
||||
CHECK_MODULES := $(ALL_MODULES), \
|
||||
))
|
||||
USE_WRAPPER := true))
|
||||
|
||||
ALL_TARGETS += $(LIBS_TARGETS)
|
||||
|
||||
@@ -218,6 +210,7 @@ $(eval $(call DeclareRecipesForPhase, STATIC_LIBS, \
|
||||
FILE_PREFIX := Lib, \
|
||||
MAKE_SUBDIR := lib, \
|
||||
CHECK_MODULES := $(STATIC_LIBS_MODULES), \
|
||||
USE_WRAPPER := true, \
|
||||
EXTRA_ARGS := STATIC_LIBS=true, \
|
||||
))
|
||||
|
||||
@@ -230,7 +223,7 @@ $(eval $(call DeclareRecipesForPhase, LAUNCHER, \
|
||||
FILE_PREFIX := Launcher, \
|
||||
MAKE_SUBDIR := launcher, \
|
||||
CHECK_MODULES := $(ALL_MODULES), \
|
||||
))
|
||||
USE_WRAPPER := true))
|
||||
|
||||
ALL_TARGETS += $(LAUNCHER_TARGETS)
|
||||
|
||||
@@ -258,14 +251,11 @@ endef
|
||||
|
||||
$(foreach v, $(JVM_VARIANTS), $(eval $(call DeclareHotspotLibsRecipe,$v)))
|
||||
|
||||
$(eval $(call SetupTarget, hotspot-ide-project, \
|
||||
MAKEFILE := ide/visualstudio/hotspot/CreateVSProject, \
|
||||
DEPS := hotspot exploded-image, \
|
||||
ARGS := -I$(TOPDIR)/make/hotspot, \
|
||||
))
|
||||
hotspot-ide-project:
|
||||
+($(CD) $(TOPDIR)/make/hotspot && $(MAKE) $(MAKE_ARGS) -f ide/CreateVSProject.gmk)
|
||||
|
||||
ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \
|
||||
$(HOTSPOT_VARIANT_LIBS_TARGETS)
|
||||
$(HOTSPOT_VARIANT_LIBS_TARGETS) hotspot-ide-project
|
||||
|
||||
################################################################################
|
||||
# Generate libs and launcher targets for creating compile_commands.json fragments
|
||||
@@ -286,67 +276,51 @@ $(foreach t, $(LIBS_TARGETS) $(LAUNCHER_TARGETS), \
|
||||
$(eval $(call DeclareCompileCommandsRecipe,$t,JDK)) \
|
||||
)
|
||||
|
||||
$(eval $(call SetupTarget, compile-commands, \
|
||||
MAKEFILE := CompileCommands, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTarget, compile-commands-hotspot, \
|
||||
MAKEFILE := CompileCommands, \
|
||||
))
|
||||
compile-commands compile-commands-hotspot:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileCommands.gmk)
|
||||
|
||||
ALL_TARGETS += $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK)
|
||||
ALL_TARGETS += compile-commands compile-commands-hotspot
|
||||
|
||||
################################################################################
|
||||
# VS Code projects
|
||||
vscode-project:
|
||||
+($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
|
||||
VSCODE_INDEXER=cpptools)
|
||||
|
||||
$(eval $(call SetupTarget, vscode-project, \
|
||||
MAKEFILE := ide/vscode/hotspot/CreateVSCodeProject, \
|
||||
ARGS := VSCODE_INDEXER=cpptools, \
|
||||
DEPS := compile-commands, \
|
||||
))
|
||||
vscode-project-clangd:
|
||||
+($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
|
||||
VSCODE_INDEXER=clangd)
|
||||
|
||||
$(eval $(call SetupTarget, vscode-project-clangd, \
|
||||
MAKEFILE := ide/vscode/hotspot/CreateVSCodeProject, \
|
||||
ARGS := VSCODE_INDEXER=clangd, \
|
||||
DEPS := compile-commands, \
|
||||
))
|
||||
vscode-project-rtags:
|
||||
+($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
|
||||
VSCODE_INDEXER=rtags)
|
||||
|
||||
$(eval $(call SetupTarget, vscode-project-rtags, \
|
||||
MAKEFILE := ide/vscode/hotspot/CreateVSCodeProject, \
|
||||
ARGS := VSCODE_INDEXER=rtags, \
|
||||
DEPS := compile-commands, \
|
||||
))
|
||||
vscode-project-ccls:
|
||||
+($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
|
||||
VSCODE_INDEXER=ccls)
|
||||
|
||||
$(eval $(call SetupTarget, vscode-project-ccls, \
|
||||
MAKEFILE := ide/vscode/hotspot/CreateVSCodeProject, \
|
||||
ARGS := VSCODE_INDEXER=ccls, \
|
||||
DEPS := compile-commands, \
|
||||
))
|
||||
ALL_TARGETS += vscode-project vscode-project-clangd vscode-project-rtags \
|
||||
vscode-project-ccls
|
||||
|
||||
################################################################################
|
||||
# Build demos targets
|
||||
|
||||
# The demos are currently linking to libjvm and libjava, just like all other
|
||||
# jdk libs, even though they don't need to. To avoid warnings, make sure they
|
||||
# aren't built until after libjava and libjvm are available to link to.
|
||||
$(eval $(call SetupTarget, demos-jdk, \
|
||||
MAKEFILE := CompileDemos, \
|
||||
DEPS := java.base-libs exploded-image, \
|
||||
))
|
||||
demos-jdk:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileDemos.gmk)
|
||||
|
||||
$(eval $(call SetupTarget, test-image-demos-jdk, \
|
||||
MAKEFILE := CompileDemos, \
|
||||
TARGET := images, \
|
||||
DEPS := demos-jdk, \
|
||||
))
|
||||
test-image-demos-jdk:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileDemos.gmk images)
|
||||
|
||||
ALL_TARGETS += demos-jdk test-image-demos-jdk
|
||||
|
||||
################################################################################
|
||||
# Jigsaw specific data and analysis targets.
|
||||
|
||||
$(eval $(call SetupTarget, generate-summary, \
|
||||
MAKEFILE := GenerateModuleSummary, \
|
||||
DEPS := jmods buildtools-modules, \
|
||||
))
|
||||
generate-summary:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f GenerateModuleSummary.gmk)
|
||||
|
||||
ALL_TARGETS += generate-summary
|
||||
|
||||
################################################################################
|
||||
# Jmod targets
|
||||
@@ -367,15 +341,11 @@ ALL_TARGETS += $(JMOD_TARGETS)
|
||||
################################################################################
|
||||
# Images targets
|
||||
|
||||
$(eval $(call SetupTarget, store-source-revision, \
|
||||
MAKEFILE := SourceRevision, \
|
||||
TARGET := store-source-revision, \
|
||||
))
|
||||
store-source-revision:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f SourceRevision.gmk store-source-revision)
|
||||
|
||||
$(eval $(call SetupTarget, create-source-revision-tracker, \
|
||||
MAKEFILE := SourceRevision, \
|
||||
TARGET := create-source-revision-tracker, \
|
||||
))
|
||||
create-source-revision-tracker:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f SourceRevision.gmk create-source-revision-tracker)
|
||||
|
||||
BOOTCYCLE_TARGET := product-images
|
||||
bootcycle-images:
|
||||
@@ -388,150 +358,97 @@ bootcycle-images:
|
||||
$(call LogWarn, Boot cycle build disabled when cross compiling)
|
||||
endif
|
||||
|
||||
$(eval $(call SetupTarget, zip-security, \
|
||||
MAKEFILE := ZipSecurity, \
|
||||
DEPS := java.base-java java.security.jgss-java java.security.jgss-libs, \
|
||||
))
|
||||
zip-security:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ZipSecurity.gmk)
|
||||
|
||||
$(eval $(call SetupTarget, zip-source, \
|
||||
MAKEFILE := ZipSource, \
|
||||
DEPS := gensrc, \
|
||||
))
|
||||
zip-source:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ZipSource.gmk)
|
||||
|
||||
$(eval $(call SetupTarget, jrtfs-jar, \
|
||||
MAKEFILE := JrtfsJar, \
|
||||
DEPS := interim-langtools, \
|
||||
))
|
||||
jrtfs-jar:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f JrtfsJar.gmk)
|
||||
|
||||
$(eval $(call SetupTarget, jdk-image, \
|
||||
MAKEFILE := Images, \
|
||||
TARGET := jdk, \
|
||||
DEPS := jmods zip-source demos release-file, \
|
||||
))
|
||||
jdk-image:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk jdk)
|
||||
|
||||
$(eval $(call SetupTarget, legacy-jre-image, \
|
||||
MAKEFILE := Images, \
|
||||
TARGET := jre, \
|
||||
DEPS := jmods release-file, \
|
||||
))
|
||||
legacy-jre-image:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk jre)
|
||||
|
||||
$(eval $(call SetupTarget, symbols-image, \
|
||||
MAKEFILE := Images, \
|
||||
TARGET := symbols, \
|
||||
))
|
||||
symbols-image:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk symbols)
|
||||
|
||||
$(eval $(call SetupTarget, static-libs-image, \
|
||||
MAKEFILE := StaticLibsImage, \
|
||||
))
|
||||
static-libs-image:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f StaticLibsImage.gmk)
|
||||
|
||||
$(eval $(call SetupTarget, mac-jdk-bundle, \
|
||||
MAKEFILE := MacBundles, \
|
||||
TARGET := jdk-bundle, \
|
||||
DEPS := jdk-image, \
|
||||
))
|
||||
mac-jdk-bundle:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk jdk-bundle)
|
||||
|
||||
$(eval $(call SetupTarget, mac-legacy-jre-bundle, \
|
||||
MAKEFILE := MacBundles, \
|
||||
TARGET := jre-bundle, \
|
||||
DEPS := legacy-jre-image, \
|
||||
))
|
||||
mac-legacy-jre-bundle:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk jre-bundle)
|
||||
|
||||
$(eval $(call SetupTarget, release-file, \
|
||||
MAKEFILE := ReleaseFile, \
|
||||
DEPS := create-source-revision-tracker, \
|
||||
))
|
||||
release-file:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ReleaseFile.gmk)
|
||||
|
||||
$(eval $(call SetupTarget, exploded-image-optimize, \
|
||||
MAKEFILE := ExplodedImageOptimize, \
|
||||
DEPS := java copy gendata java.base-libs java.base-launchers \
|
||||
buildtools-modules, \
|
||||
))
|
||||
exploded-image-optimize:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ExplodedImageOptimize.gmk)
|
||||
|
||||
$(eval $(call SetupTarget, graal-builder-image, \
|
||||
MAKEFILE := GraalBuilderImage, \
|
||||
DEPS := jdk-image static-libs-image, \
|
||||
))
|
||||
graal-builder-image:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f GraalBuilderImage.gmk)
|
||||
|
||||
ifeq ($(JCOV_ENABLED), true)
|
||||
$(eval $(call SetupTarget, jcov-image, \
|
||||
MAKEFILE := Coverage, \
|
||||
TARGET := jcov-image, \
|
||||
DEPS := jdk-image, \
|
||||
))
|
||||
jcov-image:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Coverage.gmk jcov-image)
|
||||
endif
|
||||
|
||||
ALL_TARGETS += bootcycle-images
|
||||
ALL_TARGETS += store-source-revision create-source-revision-tracker bootcycle-images zip-security \
|
||||
zip-source jrtfs-jar jdk-image legacy-jre-image \
|
||||
symbols-image static-libs-image mac-jdk-bundle mac-legacy-jre-bundle \
|
||||
release-file exploded-image-optimize graal-builder-image jcov-image
|
||||
|
||||
################################################################################
|
||||
# Docs targets
|
||||
|
||||
# If building full docs, to complete docs-*-api we need both the javadoc and
|
||||
# modulegraph targets.
|
||||
$(eval $(call SetupTarget, docs-jdk-api-javadoc, \
|
||||
MAKEFILE := Docs, \
|
||||
TARGET := docs-jdk-api-javadoc, \
|
||||
))
|
||||
docs-jdk-api-javadoc:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-jdk-api-javadoc)
|
||||
|
||||
$(eval $(call SetupTarget, docs-jdk-api-modulegraph, \
|
||||
MAKEFILE := Docs, \
|
||||
TARGET := docs-jdk-api-modulegraph, \
|
||||
DEPS := exploded-image buildtools-modules, \
|
||||
))
|
||||
docs-jdk-api-modulegraph:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-jdk-api-modulegraph)
|
||||
|
||||
$(eval $(call SetupTarget, docs-javase-api-javadoc, \
|
||||
MAKEFILE := Docs, \
|
||||
TARGET := docs-javase-api-javadoc, \
|
||||
))
|
||||
docs-javase-api-javadoc:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-javase-api-javadoc)
|
||||
|
||||
$(eval $(call SetupTarget, docs-javase-api-modulegraph, \
|
||||
MAKEFILE := Docs, \
|
||||
TARGET := docs-javase-api-modulegraph, \
|
||||
DEPS := exploded-image buildtools-modules, \
|
||||
))
|
||||
docs-javase-api-modulegraph:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-javase-api-modulegraph)
|
||||
|
||||
$(eval $(call SetupTarget, docs-reference-api-javadoc, \
|
||||
MAKEFILE := Docs, \
|
||||
TARGET := docs-reference-api-javadoc, \
|
||||
))
|
||||
docs-reference-api-javadoc:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-reference-api-javadoc)
|
||||
|
||||
$(eval $(call SetupTarget, docs-reference-api-modulegraph, \
|
||||
MAKEFILE := Docs, \
|
||||
TARGET := docs-reference-api-modulegraph, \
|
||||
DEPS := exploded-image buildtools-modules, \
|
||||
))
|
||||
docs-reference-api-modulegraph:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-reference-api-modulegraph)
|
||||
|
||||
# The gensrc steps for jdk.jdi create html spec files.
|
||||
$(eval $(call SetupTarget, docs-jdk-specs, \
|
||||
MAKEFILE := Docs, \
|
||||
TARGET := docs-jdk-specs, \
|
||||
DEPS := buildtools-jdk jdk.jdi-gensrc docs-jdk-index, \
|
||||
))
|
||||
docs-jdk-specs:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-jdk-specs)
|
||||
|
||||
$(eval $(call SetupTarget, docs-jdk-index, \
|
||||
MAKEFILE := Docs, \
|
||||
TARGET := docs-jdk-index, \
|
||||
))
|
||||
docs-jdk-index:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-jdk-index)
|
||||
|
||||
$(eval $(call SetupTarget, docs-zip, \
|
||||
MAKEFILE := Docs, \
|
||||
TARGET := docs-zip, \
|
||||
DEPS := docs-jdk, \
|
||||
))
|
||||
docs-zip:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-zip)
|
||||
|
||||
$(eval $(call SetupTarget, docs-specs-zip, \
|
||||
MAKEFILE := Docs, \
|
||||
TARGET := docs-specs-zip, \
|
||||
DEPS := docs-jdk-specs, \
|
||||
))
|
||||
docs-specs-zip:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-specs-zip)
|
||||
|
||||
$(eval $(call SetupTarget, update-build-docs, \
|
||||
MAKEFILE := UpdateBuildDocs, \
|
||||
))
|
||||
update-build-docs:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UpdateBuildDocs.gmk)
|
||||
|
||||
$(eval $(call SetupTarget, update-x11wrappers, \
|
||||
MAKEFILE := UpdateX11Wrappers, \
|
||||
DEPS := java.base-copy buildtools-jdk, \
|
||||
))
|
||||
update-x11wrappers:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UpdateX11Wrappers.gmk)
|
||||
|
||||
ALL_TARGETS += docs-jdk-api-javadoc docs-jdk-api-modulegraph \
|
||||
docs-javase-api-javadoc docs-javase-api-modulegraph \
|
||||
docs-reference-api-javadoc docs-reference-api-modulegraph docs-jdk-specs \
|
||||
docs-jdk-index docs-zip docs-specs-zip update-build-docs update-x11wrappers
|
||||
|
||||
################################################################################
|
||||
# Cross compilation support
|
||||
@@ -545,15 +462,17 @@ endif
|
||||
BUILDJDK_MODULES := $(sort $(foreach m, jdk.jlink $(INTERIM_IMAGE_MODULES), \
|
||||
$(call FindTransitiveDepsForModule, $m) $m))
|
||||
|
||||
$(eval $(call SetupTarget, create-buildjdk-interim-image, \
|
||||
MAKEFILE := Main, \
|
||||
TARGET := create-buildjdk-interim-image-helper, \
|
||||
ARGS := SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
|
||||
HOTSPOT_SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
|
||||
CREATING_BUILDJDK=true \
|
||||
LOG_PREFIX="[buildjdk] " \
|
||||
JAVA_MODULES="$(BUILDJDK_MODULES)", \
|
||||
))
|
||||
create-buildjdk-interim-image:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk \
|
||||
$@-helper \
|
||||
SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
|
||||
HOTSPOT_SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
|
||||
CREATING_BUILDJDK=true \
|
||||
LOG_PREFIX="[buildjdk] " \
|
||||
JAVA_MODULES="$(BUILDJDK_MODULES)" \
|
||||
)
|
||||
|
||||
ALL_TARGETS += create-buildjdk-copy create-buildjdk-interim-image
|
||||
|
||||
################################################################################
|
||||
# The interim-image is a small jlinked image that is used to generate artifacts
|
||||
@@ -573,16 +492,16 @@ endef
|
||||
|
||||
$(foreach m, $(INTERIM_IMAGE_MODULES), $(eval $(call DeclareInterimJmodRecipe,$m)))
|
||||
|
||||
$(eval $(call SetupTarget, interim-image, \
|
||||
MAKEFILE := InterimImage, \
|
||||
))
|
||||
interim-image:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f InterimImage.gmk)
|
||||
|
||||
ifeq ($(ENABLE_GENERATE_CLASSLIST), true)
|
||||
$(eval $(call SetupTarget, generate-link-opt-data, \
|
||||
MAKEFILE := GenerateLinkOptData, \
|
||||
))
|
||||
generate-link-opt-data:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f GenerateLinkOptData.gmk)
|
||||
endif
|
||||
|
||||
ALL_TARGETS += $(INTERIM_JMOD_TARGETS) interim-image generate-link-opt-data
|
||||
|
||||
################################################################################
|
||||
# Generate test names for all JTReg test groups
|
||||
#
|
||||
@@ -611,151 +530,113 @@ ALL_TARGETS += $(ALL_TEST_TARGETS) $(ALL_EXPLODED_TEST_TARGETS)
|
||||
# Build tests and microbenchmarks
|
||||
#
|
||||
|
||||
$(eval $(call SetupTarget, prepare-test-image, \
|
||||
MAKEFILE := TestImage, \
|
||||
TARGET := prepare-test-image, \
|
||||
))
|
||||
prepare-test-image:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f TestImage.gmk prepare-test-image)
|
||||
|
||||
$(eval $(call SetupTarget, build-test-hotspot-jtreg-native, \
|
||||
MAKEFILE := test/JtregNativeHotspot, \
|
||||
TARGET := build-test-hotspot-jtreg-native, \
|
||||
DEPS := buildtools-jdk, \
|
||||
))
|
||||
build-test-hotspot-jtreg-native:
|
||||
+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNativeHotspot.gmk \
|
||||
build-test-hotspot-jtreg-native)
|
||||
|
||||
$(eval $(call SetupTarget, test-image-hotspot-jtreg-native, \
|
||||
MAKEFILE := test/JtregNativeHotspot, \
|
||||
TARGET := test-image-hotspot-jtreg-native, \
|
||||
DEPS := build-test-hotspot-jtreg-native, \
|
||||
))
|
||||
test-image-hotspot-jtreg-native:
|
||||
+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNativeHotspot.gmk \
|
||||
test-image-hotspot-jtreg-native)
|
||||
|
||||
$(eval $(call SetupTarget, build-test-jdk-jtreg-native, \
|
||||
MAKEFILE := test/JtregNativeJdk, \
|
||||
TARGET := build-test-jdk-jtreg-native, \
|
||||
DEPS := buildtools-jdk java.base-libs, \
|
||||
))
|
||||
build-test-jdk-jtreg-native:
|
||||
+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNativeJdk.gmk \
|
||||
build-test-jdk-jtreg-native)
|
||||
|
||||
$(eval $(call SetupTarget, test-image-jdk-jtreg-native, \
|
||||
MAKEFILE := test/JtregNativeJdk, \
|
||||
TARGET := test-image-jdk-jtreg-native, \
|
||||
DEPS := build-test-jdk-jtreg-native, \
|
||||
))
|
||||
test-image-jdk-jtreg-native:
|
||||
+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNativeJdk.gmk \
|
||||
test-image-jdk-jtreg-native)
|
||||
|
||||
$(eval $(call SetupTarget, build-test-hotspot-jtreg-graal, \
|
||||
MAKEFILE := test/JtregGraalUnit, \
|
||||
TARGET := build-test-hotspot-jtreg-graal, \
|
||||
DEPS := exploded-image, \
|
||||
))
|
||||
build-test-hotspot-jtreg-graal:
|
||||
+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregGraalUnit.gmk \
|
||||
build-test-hotspot-jtreg-graal)
|
||||
|
||||
$(eval $(call SetupTarget, test-image-hotspot-jtreg-graal, \
|
||||
MAKEFILE := test/JtregGraalUnit, \
|
||||
TARGET := test-image-hotspot-jtreg-graal, \
|
||||
DEPS := build-test-hotspot-jtreg-graal, \
|
||||
))
|
||||
test-image-hotspot-jtreg-graal:
|
||||
+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregGraalUnit.gmk \
|
||||
test-image-hotspot-jtreg-graal)
|
||||
|
||||
ifneq ($GTEST_FRAMEWORK_SRC), )
|
||||
$(eval $(call SetupTarget, test-image-hotspot-gtest, \
|
||||
MAKEFILE := hotspot/test/GtestImage, \
|
||||
DEPS := hotspot, \
|
||||
))
|
||||
ifeq ($(BUILD_GTEST), true)
|
||||
test-image-hotspot-gtest:
|
||||
+($(CD) $(TOPDIR)/make/hotspot/test && $(MAKE) $(MAKE_ARGS) -f GtestImage.gmk)
|
||||
endif
|
||||
|
||||
$(eval $(call SetupTarget, build-test-lib, \
|
||||
MAKEFILE := test/BuildTestLib, \
|
||||
DEPS := exploded-image, \
|
||||
))
|
||||
build-test-lib:
|
||||
+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f BuildTestLib.gmk)
|
||||
|
||||
ifeq ($(BUILD_FAILURE_HANDLER), true)
|
||||
# Builds the failure handler jtreg extension
|
||||
$(eval $(call SetupTarget, build-test-failure-handler, \
|
||||
MAKEFILE := test/BuildFailureHandler, \
|
||||
TARGET := build, \
|
||||
DEPS := interim-langtools, \
|
||||
))
|
||||
build-test-failure-handler:
|
||||
+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \
|
||||
-f BuildFailureHandler.gmk build)
|
||||
|
||||
# Copies the failure handler jtreg extension into the test image
|
||||
$(eval $(call SetupTarget, test-image-failure-handler, \
|
||||
MAKEFILE := test/BuildFailureHandler, \
|
||||
TARGET := images, \
|
||||
DEPS := build-test-failure-handler, \
|
||||
))
|
||||
test-image-failure-handler:
|
||||
+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \
|
||||
-f BuildFailureHandler.gmk images)
|
||||
endif
|
||||
|
||||
$(eval $(call SetupTarget, build-microbenchmark, \
|
||||
MAKEFILE := test/BuildMicrobenchmark, \
|
||||
DEPS := interim-langtools exploded-image, \
|
||||
))
|
||||
build-microbenchmark:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f test/BuildMicrobenchmark.gmk)
|
||||
|
||||
ALL_TARGETS += prepare-test-image build-test-hotspot-jtreg-native \
|
||||
test-image-hotspot-jtreg-native build-test-jdk-jtreg-native \
|
||||
test-image-jdk-jtreg-native build-test-lib build-test-failure-handler \
|
||||
test-failure-handler test-image-failure-handler test-image-hotspot-gtest \
|
||||
test-image-hotspot-jtreg-graal build-test-hotspot-jtreg-graal \
|
||||
build-microbenchmark
|
||||
|
||||
################################################################################
|
||||
# Run tests
|
||||
|
||||
$(eval $(call SetupTarget, test, \
|
||||
MAKEFILE := RunTests, \
|
||||
ARGS := TEST="$(TEST)", \
|
||||
DEPS := jdk-image test-image, \
|
||||
))
|
||||
test:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
|
||||
TEST="$(TEST)")
|
||||
|
||||
$(eval $(call SetupTarget, exploded-test, \
|
||||
MAKEFILE := RunTests, \
|
||||
ARGS := TEST="$(TEST)" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR), \
|
||||
DEPS := exploded-image test-image, \
|
||||
))
|
||||
exploded-test:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
|
||||
TEST="$(TEST)" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR))
|
||||
|
||||
ifeq ($(JCOV_ENABLED), true)
|
||||
$(eval $(call SetupTarget, jcov-test, \
|
||||
MAKEFILE := RunTests, \
|
||||
ARGS := TEST="$(TEST)" TEST_OPTS_JCOV=true, \
|
||||
DEPS := jcov-image test-image, \
|
||||
))
|
||||
endif
|
||||
jcov-test:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
|
||||
TEST="$(TEST)" TEST_OPTS_JCOV=true)
|
||||
|
||||
ALL_TARGETS += test exploded-test jcov-test
|
||||
|
||||
################################################################################
|
||||
# Bundles
|
||||
|
||||
$(eval $(call SetupTarget, product-bundles, \
|
||||
MAKEFILE := Bundles, \
|
||||
TARGET := product-bundles, \
|
||||
DEPS := product-images, \
|
||||
))
|
||||
product-bundles:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk product-bundles)
|
||||
|
||||
$(eval $(call SetupTarget, legacy-bundles, \
|
||||
MAKEFILE := Bundles, \
|
||||
TARGET := legacy-bundles, \
|
||||
DEPS := legacy-images, \
|
||||
))
|
||||
legacy-bundles:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk legacy-bundles)
|
||||
|
||||
$(eval $(call SetupTarget, test-bundles, \
|
||||
MAKEFILE := Bundles, \
|
||||
TARGET := test-bundles, \
|
||||
DEPS := test-image, \
|
||||
))
|
||||
test-bundles:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk test-bundles)
|
||||
|
||||
$(eval $(call SetupTarget, docs-bundles, \
|
||||
MAKEFILE := Bundles, \
|
||||
TARGET := docs-bundles, \
|
||||
DEPS := docs-image, \
|
||||
))
|
||||
docs-bundles:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk docs-bundles)
|
||||
|
||||
$(eval $(call SetupTarget, static-libs-bundles, \
|
||||
MAKEFILE := Bundles, \
|
||||
TARGET := static-libs-bundles, \
|
||||
DEPS := static-libs-image, \
|
||||
))
|
||||
static-libs-bundles:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk static-libs-bundles)
|
||||
|
||||
ifeq ($(JCOV_ENABLED), true)
|
||||
$(eval $(call SetupTarget, jcov-bundles, \
|
||||
MAKEFILE := Bundles, \
|
||||
TARGET := jcov-bundles, \
|
||||
DEPS := jcov-image, \
|
||||
))
|
||||
jcov-bundles:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk jcov-bundles)
|
||||
endif
|
||||
|
||||
ALL_TARGETS += product-bundles legacy-bundles test-bundles docs-bundles \
|
||||
static-libs-bundles jcov-bundles
|
||||
|
||||
################################################################################
|
||||
# Install targets
|
||||
|
||||
$(eval $(call SetupTarget, install, \
|
||||
MAKEFILE := Install, \
|
||||
DEPS := product-images, \
|
||||
))
|
||||
install:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Install.gmk)
|
||||
|
||||
ALL_TARGETS += install
|
||||
|
||||
################################################################################
|
||||
#
|
||||
@@ -773,13 +654,19 @@ $(eval $(call SetupTarget, install, \
|
||||
# recipe targets are disabled. This makes it possible to run a select set of
|
||||
# recipe targets in order. It's the responsibility of the user to make sure
|
||||
# all prerequisites are fulfilled.
|
||||
ifeq ($(DEPS), none)
|
||||
ifneq ($(findstring -only, $(MAKECMDGOALS)), )
|
||||
.NOTPARALLEL:
|
||||
else
|
||||
$(LANGTOOLS_GENSRC_TARGETS): buildtools-langtools
|
||||
|
||||
interim-langtools: $(INTERIM_LANGTOOLS_GENSRC_TARGETS)
|
||||
|
||||
buildtools-jdk: interim-langtools interim-tzdb
|
||||
|
||||
buildtools-hotspot: interim-langtools
|
||||
|
||||
buildtools-modules: exploded-image-base
|
||||
|
||||
$(HOTSPOT_GENSRC_TARGETS): interim-langtools buildtools-hotspot
|
||||
|
||||
$(JDK_GENSRC_TARGETS): interim-langtools buildtools-jdk
|
||||
@@ -796,6 +683,10 @@ else
|
||||
$(eval hotspot-$v-libs: hotspot-$v-gensrc java.base-copy) \
|
||||
)
|
||||
|
||||
hotspot-ide-project: hotspot exploded-image
|
||||
|
||||
generate-exported-symbols: java.base-libs jdk.jdwp.agent-libs
|
||||
|
||||
# If not already set, set the JVM variant target so that the JVM will be built.
|
||||
JVM_MAIN_LIB_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-libs
|
||||
|
||||
@@ -808,6 +699,12 @@ else
|
||||
$(LAUNCHER_TARGETS): generate-exported-symbols
|
||||
endif
|
||||
|
||||
# The demos are currently linking to libjvm and libjava, just like all other
|
||||
# jdk libs, even though they don't need to. To avoid warnings, make sure they
|
||||
# aren't built until after libjava and libjvm are available to link to.
|
||||
demos-jdk: java.base-libs exploded-image
|
||||
test-image-demos-jdk: demos-jdk
|
||||
|
||||
# Declare dependency from <module>-java to <module>-gensrc
|
||||
$(foreach m, $(GENSRC_MODULES), $(eval $m-java: $m-gensrc))
|
||||
|
||||
@@ -895,6 +792,11 @@ else
|
||||
compile-commands-hotspot: $(COMPILE_COMMANDS_TARGETS_HOTSPOT)
|
||||
compile-commands: $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK)
|
||||
|
||||
vscode-project: compile-commands
|
||||
vscode-project-clangd: compile-commands
|
||||
vscode-project-rtags: compile-commands
|
||||
vscode-project-ccls: compile-commands
|
||||
|
||||
# The -static-libs targets depend on -java as well as java.base-copy.
|
||||
$(foreach m, $(filter $(JAVA_MODULES), $(STATIC_LIBS_MODULES)), \
|
||||
$(eval $m-static-libs: $m-java java.base-copy))
|
||||
@@ -930,7 +832,14 @@ else
|
||||
# All modules include the main license files from java.base.
|
||||
$(JMOD_TARGETS): java.base-copy
|
||||
|
||||
zip-security: $(filter jdk.crypto%, $(JAVA_TARGETS))
|
||||
zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \
|
||||
$(filter jdk.crypto%, $(JAVA_TARGETS))
|
||||
|
||||
zip-source: gensrc
|
||||
|
||||
jrtfs-jar: interim-langtools
|
||||
|
||||
build-microbenchmark: interim-langtools exploded-image
|
||||
|
||||
ifeq ($(ENABLE_GENERATE_CLASSLIST), true)
|
||||
ifeq ($(CREATE_BUILDJDK), true)
|
||||
@@ -948,10 +857,29 @@ else
|
||||
java.base-jmod jdk.jlink-jmod jdk-image legacy-jre-image: generate-link-opt-data
|
||||
endif
|
||||
|
||||
release-file: create-source-revision-tracker
|
||||
|
||||
jdk-image: jmods zip-source demos release-file
|
||||
legacy-jre-image: jmods release-file
|
||||
symbols-image: $(LIBS_TARGETS) $(LAUNCHER_TARGETS)
|
||||
|
||||
static-libs-image: $(STATIC_LIBS_TARGETS)
|
||||
|
||||
graal-builder-image: jdk-image static-libs-image
|
||||
|
||||
mac-jdk-bundle: jdk-image
|
||||
mac-legacy-jre-bundle: legacy-jre-image
|
||||
|
||||
ifeq ($(JCOV_INPUT_JDK), )
|
||||
jcov-image: jdk-image
|
||||
endif
|
||||
|
||||
# The optimize target can run as soon as the modules dir has been completely
|
||||
# populated (java, copy and gendata targets) and the basic libs and launchers
|
||||
# have been built.
|
||||
exploded-image-optimize: java copy gendata java.base-libs java.base-launchers \
|
||||
buildtools-modules
|
||||
|
||||
bootcycle-images: jdk-image
|
||||
|
||||
docs-jdk-api-javadoc: $(GENSRC_TARGETS)
|
||||
@@ -960,13 +888,30 @@ else
|
||||
|
||||
docs-reference-api-javadoc: $(GENSRC_TARGETS)
|
||||
|
||||
docs-jdk-api-modulegraph: exploded-image buildtools-modules
|
||||
|
||||
docs-javase-api-modulegraph: exploded-image buildtools-modules
|
||||
|
||||
docs-reference-api-modulegraph: exploded-image buildtools-modules
|
||||
|
||||
# If not already set, then set the JVM specific docs targets
|
||||
JVM_DOCS_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-gensrc
|
||||
|
||||
# The gensrc steps for hotspot create html spec files.
|
||||
docs-jdk-specs: $(JVM_DOCS_TARGETS)
|
||||
# The gensrc steps for hotspot and jdk.jdi create html spec files.
|
||||
docs-jdk-specs: buildtools-jdk $(JVM_DOCS_TARGETS) jdk.jdi-gensrc \
|
||||
docs-jdk-index
|
||||
|
||||
docs-zip: docs-jdk
|
||||
|
||||
docs-specs-zip: docs-jdk-specs
|
||||
|
||||
# Tests
|
||||
test: jdk-image test-image
|
||||
|
||||
exploded-test: exploded-image test-image
|
||||
|
||||
jcov-test: jcov-image test-image
|
||||
|
||||
test-make: clean-test-make compile-commands
|
||||
|
||||
test-make-compile-commands: compile-commands
|
||||
@@ -977,7 +922,44 @@ else
|
||||
|
||||
interim-image: $(INTERIM_JMOD_TARGETS)
|
||||
|
||||
build-test-hotspot-jtreg-native: hotspot-$(JVM_VARIANT_MAIN)-libs
|
||||
build-test-lib: exploded-image
|
||||
|
||||
build-test-failure-handler: interim-langtools
|
||||
|
||||
test-image-failure-handler: build-test-failure-handler
|
||||
|
||||
build-test-hotspot-jtreg-native: buildtools-jdk \
|
||||
hotspot-$(JVM_VARIANT_MAIN)-libs
|
||||
|
||||
build-test-jdk-jtreg-native: buildtools-jdk java.base-libs
|
||||
|
||||
build-test-hotspot-jtreg-graal: exploded-image
|
||||
|
||||
test-image-hotspot-jtreg-native: build-test-hotspot-jtreg-native
|
||||
|
||||
test-image-jdk-jtreg-native: build-test-jdk-jtreg-native
|
||||
|
||||
test-image-hotspot-jtreg-graal: build-test-hotspot-jtreg-graal
|
||||
|
||||
test-image-hotspot-gtest: hotspot
|
||||
|
||||
install: product-images
|
||||
|
||||
product-bundles: product-images
|
||||
|
||||
legacy-bundles: legacy-images
|
||||
|
||||
test-bundles: test-image
|
||||
|
||||
docs-bundles: docs-image
|
||||
|
||||
jcov-bundles: jcov-image
|
||||
|
||||
static-libs-bundles: static-libs-image
|
||||
|
||||
generate-summary: jmods buildtools-modules
|
||||
|
||||
update-x11wrappers: java.base-copy buildtools-jdk
|
||||
|
||||
endif
|
||||
|
||||
@@ -1100,27 +1082,17 @@ endif
|
||||
# This target builds the documentation image
|
||||
docs-image: docs-jdk
|
||||
|
||||
# If not already set, set the JVM specific targets to build the test image
|
||||
JVM_TEST_IMAGE_TARGETS ?= test-image-hotspot-jtreg-native test-image-hotspot-gtest
|
||||
|
||||
ifeq ($(INCLUDE_GRAAL), true)
|
||||
JVM_TEST_IMAGE_TARGETS += test-image-hotspot-jtreg-graal
|
||||
endif
|
||||
|
||||
# This target builds the test image
|
||||
test-image: prepare-test-image test-image-jdk-jtreg-native test-image-demos-jdk
|
||||
|
||||
ifneq ($(JVM_TEST_IMAGE_TARGETS), )
|
||||
# If JVM_TEST_IMAGE_TARGETS is externally defined, use it instead of the
|
||||
# standard hotspot set of tests.
|
||||
test-image: $(JVM_TEST_IMAGE_TARGETS)
|
||||
else
|
||||
test-image: test-image-hotspot-jtreg-native
|
||||
ifneq ($(GTEST_FRAMEWORK_SRC), )
|
||||
test-image: test-image-hotspot-gtest
|
||||
endif
|
||||
|
||||
ifeq ($(INCLUDE_GRAAL), true)
|
||||
test-image: test-image-hotspot-jtreg-graal
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_FAILURE_HANDLER), true)
|
||||
test-image: test-image-failure-handler
|
||||
endif
|
||||
test-image: prepare-test-image \
|
||||
test-image-jdk-jtreg-native test-image-failure-handler \
|
||||
test-image-demos-jdk $(JVM_TEST_IMAGE_TARGETS)
|
||||
|
||||
ifneq ($(JMH_CORE_JAR), )
|
||||
test-image: build-microbenchmark
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2019, 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
|
||||
@@ -30,27 +30,6 @@
|
||||
ifndef _MAINSUPPORT_GMK
|
||||
_MAINSUPPORT_GMK := 1
|
||||
|
||||
# Setup make rules for creating a top-level target.
|
||||
# Parameter 1 is the name of the rule. This name is used as variable prefix.
|
||||
#
|
||||
# Remaining parameters are named arguments. These include:
|
||||
# MAKEFILE the makefile to delegate to
|
||||
# TARGET the makefile target
|
||||
# ARGS arguments to the makefile
|
||||
# DEPS the target(s) this new rule depends on
|
||||
#
|
||||
SetupTarget = $(NamedParamsMacroTemplate)
|
||||
define SetupTargetBody
|
||||
$1:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f $$($1_MAKEFILE).gmk $$($1_TARGET) $$($1_ARGS))
|
||||
|
||||
ALL_TARGETS += $1
|
||||
|
||||
ifneq ($(DEPS), none)
|
||||
$1: $$($1_DEPS)
|
||||
endif
|
||||
endef
|
||||
|
||||
define CleanDocs
|
||||
@$(PRINTF) "Cleaning docs ..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@@ -148,12 +127,24 @@ PHASE_MAKEDIRS := $(TOPDIR)/make
|
||||
# Param 2: Module name
|
||||
define DeclareRecipeForModuleMakefile
|
||||
$2-$$($1_TARGET_SUFFIX):
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
|
||||
-f ModuleWrapper.gmk -I $$(TOPDIR)/make/common/modules \
|
||||
$$(addprefix -I, $$(PHASE_MAKEDIRS) \
|
||||
$$(addsuffix /modules/$2, $$(PHASE_MAKEDIRS)) \
|
||||
) \
|
||||
MODULE=$2 MAKEFILE_PREFIX=$$($1_FILE_PREFIX) $$($1_EXTRA_ARGS))
|
||||
ifeq ($$($1_USE_WRAPPER), true)
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
|
||||
-f ModuleWrapper.gmk \
|
||||
$$(addprefix -I, $$(PHASE_MAKEDIRS) \
|
||||
$$(addsuffix /$$($1_MAKE_SUBDIR), $$(PHASE_MAKEDIRS)) \
|
||||
) \
|
||||
MODULE=$2 MAKEFILE_PREFIX=$$($1_FILE_PREFIX) $$($1_EXTRA_ARGS))
|
||||
else
|
||||
+($(CD) $$(dir $$(firstword $$(wildcard $$(addsuffix \
|
||||
/$$($1_MAKE_SUBDIR)/$$($1_FILE_PREFIX)-$2.gmk, $$(PHASE_MAKEDIRS))))) \
|
||||
&& $(MAKE) $(MAKE_ARGS) \
|
||||
-f $$($1_FILE_PREFIX)-$2.gmk \
|
||||
$$(addprefix -I, $$(PHASE_MAKEDIRS) \
|
||||
$$(addsuffix /$$($1_MAKE_SUBDIR), $$(PHASE_MAKEDIRS)) \
|
||||
) \
|
||||
MODULE=$2 $$($1_EXTRA_ARGS) \
|
||||
)
|
||||
endif
|
||||
|
||||
endef
|
||||
|
||||
@@ -162,7 +153,7 @@ endef
|
||||
# Param 2: Module name
|
||||
define DeclareRecipesForPhaseAndModule
|
||||
$1_$2_MAKEFILES := $$(strip $$(wildcard \
|
||||
$$(addsuffix /modules/$2/$$($1_FILE_PREFIX).gmk, $$(PHASE_MAKEDIRS))))
|
||||
$$(addsuffix /$$($1_MAKE_SUBDIR)/$$($1_FILE_PREFIX)-$2.gmk, $$(PHASE_MAKEDIRS))))
|
||||
|
||||
# Only declare recipes if there are makefiles to call
|
||||
ifneq ($$($1_$2_MAKEFILES), )
|
||||
@@ -187,6 +178,7 @@ endef
|
||||
# TARGET_SUFFIX : Suffix of target to create for recipe
|
||||
# MAKE_SUBDIR : Subdir for this build phase
|
||||
# FILE_PREFIX : File prefix for this build phase
|
||||
# USE_WRAPPER : Set to true to use ModuleWrapper.gmk
|
||||
# CHECK_MODULES : List of modules to try
|
||||
# MULTIPLE_MAKEFILES : Set to true to handle makefiles for the same module and
|
||||
# phase in multiple repos
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2017, 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
|
||||
@@ -44,7 +44,7 @@ TOOL_GENGRAPHS := $(BUILD_JAVA) -esa -ea -cp $(TOOLS_CLASSES_DIR) \
|
||||
TOOL_MODULESUMMARY := $(BUILD_JAVA) -esa -ea -cp $(TOOLS_CLASSES_DIR) \
|
||||
build.tools.jigsaw.ModuleSummary
|
||||
|
||||
TOOL_ADD_PACKAGES_ATTRIBUTE := $(BUILD_JAVA) $(JAVA_FLAGS_SMALL_BUILDJDK) \
|
||||
TOOL_ADD_PACKAGES_ATTRIBUTE := $(BUILD_JAVA) $(JAVA_FLAGS_SMALL) \
|
||||
-cp $(TOOLS_CLASSES_DIR) \
|
||||
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \
|
||||
build.tools.jigsaw.AddPackagesAttribute
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2019, 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
|
||||
@@ -39,7 +39,7 @@ include MakeBase.gmk
|
||||
TARGETS :=
|
||||
|
||||
# Include the file being wrapped.
|
||||
include modules/$(MODULE)/$(MAKEFILE_PREFIX).gmk
|
||||
include $(MAKEFILE_PREFIX)-$(MODULE).gmk
|
||||
|
||||
# Setup copy rules from the modules directories to the jdk image directory.
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
|
||||
@@ -237,6 +237,16 @@ TEST_JOBS_FACTOR_MACHINE ?= 1
|
||||
|
||||
ifeq ($(TEST_JOBS), 0)
|
||||
CORES_DIVIDER := 2
|
||||
ifeq ($(call isTargetCpuArch, sparc), true)
|
||||
# For smaller SPARC machines we see reasonable scaling of throughput up to
|
||||
# cpus/4 without affecting test reliability. On the bigger machines, cpus/4
|
||||
# causes intermittent timeouts.
|
||||
ifeq ($(shell $(EXPR) $(NUM_CORES) \> 16), 1)
|
||||
CORES_DIVIDER := 5
|
||||
else
|
||||
CORES_DIVIDER := 4
|
||||
endif
|
||||
endif
|
||||
# For some big multi-core machines with low ulimit -u setting we hit the max
|
||||
# threads/process limit. In such a setup the memory/cores-only-guided
|
||||
# TEST_JOBS config is insufficient. From experience a concurrency setting of
|
||||
@@ -346,6 +356,7 @@ jdk_JTREG_NATIVEPATH := $(TEST_IMAGE_DIR)/jdk/jtreg/native
|
||||
jdk_JTREG_PROBLEM_LIST += $(TOPDIR)/test/jdk/ProblemList.txt
|
||||
jaxp_JTREG_PROBLEM_LIST += $(TOPDIR)/test/jaxp/ProblemList.txt
|
||||
langtools_JTREG_PROBLEM_LIST += $(TOPDIR)/test/langtools/ProblemList.txt
|
||||
nashorn_JTREG_PROBLEM_LIST += $(TOPDIR)/test/nashorn/ProblemList.txt
|
||||
hotspot_JTREG_PROBLEM_LIST += $(TOPDIR)/test/hotspot/jtreg/ProblemList.txt
|
||||
|
||||
langtools_JTREG_MAX_MEM := 768m
|
||||
@@ -680,6 +691,8 @@ define SetupRunMicroTestBody
|
||||
|
||||
# Current tests needs to open java.io
|
||||
$1_MICRO_JAVA_OPTIONS += --add-opens=java.base/java.io=ALL-UNNAMED
|
||||
# Set library path for native dependencies
|
||||
$1_MICRO_JAVA_OPTIONS += -Djava.library.path=$$(TEST_IMAGE_DIR)/micro/native
|
||||
|
||||
# Save output as JSON or CSV file
|
||||
ifneq ($$(MICRO_RESULTS_FORMAT), )
|
||||
@@ -689,8 +702,6 @@ define SetupRunMicroTestBody
|
||||
|
||||
ifneq ($$(MICRO_VM_OPTIONS)$$(MICRO_JAVA_OPTIONS), )
|
||||
JMH_JVM_ARGS := $$(MICRO_VM_OPTIONS) $$(MICRO_JAVA_OPTIONS)
|
||||
# Set library path for native dependencies
|
||||
JMH_JVM_ARGS += -Djava.library.path=$$(TEST_IMAGE_DIR)/micro/native
|
||||
$1_MICRO_VM_OPTIONS := -jvmArgs $(call ShellQuote,$$(JMH_JVM_ARGS))
|
||||
endif
|
||||
|
||||
@@ -833,8 +844,12 @@ define SetupRunJtregTestBody
|
||||
# we may end up with a lot of JVM's
|
||||
$1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $$(EXPR) 25 / $$($1_JTREG_JOBS))
|
||||
|
||||
JTREG_TIMEOUT_FACTOR ?= 4
|
||||
|
||||
# SPARC is in general slower per core so need to scale up timeouts a bit.
|
||||
ifeq ($(call isTargetCpuArch, sparc), true)
|
||||
JTREG_TIMEOUT_FACTOR ?= 8
|
||||
else
|
||||
JTREG_TIMEOUT_FACTOR ?= 4
|
||||
endif
|
||||
JTREG_VERBOSE ?= fail,error,summary
|
||||
JTREG_RETAIN ?= fail,error
|
||||
JTREG_RUN_PROBLEM_LISTS ?= false
|
||||
|
||||
@@ -163,6 +163,8 @@ else
|
||||
OPENJDK_TARGET_OS := linux
|
||||
else ifeq ($(UNAME_OS), Darwin)
|
||||
OPENJDK_TARGET_OS := macosx
|
||||
else ifeq ($(UNAME_OS), SunOS)
|
||||
OPENJDK_TARGET_OS := solaris
|
||||
else
|
||||
OPENJDK_TARGET_OS := $(UNAME_OS)
|
||||
endif
|
||||
@@ -172,20 +174,38 @@ endif
|
||||
# Assume little endian unless otherwise specified
|
||||
OPENJDK_TARGET_CPU_ENDIAN := little
|
||||
|
||||
UNAME_CPU := $(shell $(UNAME) -m)
|
||||
ifeq ($(UNAME_CPU), i686)
|
||||
OPENJDK_TARGET_CPU := x86
|
||||
OPENJDK_TARGET_CPU_BITS := 32
|
||||
else
|
||||
# Assume all others are 64-bit. We use the same CPU name as uname for
|
||||
# at least x86_64 and aarch64.
|
||||
OPENJDK_TARGET_CPU := $(UNAME_CPU)
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
# On solaris, use uname -p
|
||||
UNAME_CPU := $(shell $(UNAME) -p)
|
||||
# Assume 64-bit platform
|
||||
OPENJDK_TARGET_CPU_BITS := 64
|
||||
ifeq ($(UNAME_CPU), i386)
|
||||
OPENJDK_TARGET_CPU := x86_64
|
||||
else ifeq ($(UNAME_CPU), sparc)
|
||||
OPENJDK_TARGET_CPU := sparcv9
|
||||
OPENJDK_TARGET_CPU_ENDIAN := big
|
||||
else
|
||||
OPENJDK_TARGET_CPU := $(UNAME_CPU)
|
||||
endif
|
||||
else
|
||||
# ... all others use uname -m
|
||||
UNAME_CPU := $(shell $(UNAME) -m)
|
||||
ifeq ($(UNAME_CPU), i686)
|
||||
OPENJDK_TARGET_CPU := x86
|
||||
OPENJDK_TARGET_CPU_BITS := 32
|
||||
else
|
||||
# Assume all others are 64-bit. We use the same CPU name as uname for
|
||||
# at least x86_64 and aarch64.
|
||||
OPENJDK_TARGET_CPU := $(UNAME_CPU)
|
||||
OPENJDK_TARGET_CPU_BITS := 64
|
||||
endif
|
||||
endif
|
||||
|
||||
OPENJDK_TARGET_CPU_ARCH := $(OPENJDK_TARGET_CPU)
|
||||
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
|
||||
OPENJDK_TARGET_CPU_ARCH := x86
|
||||
else ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
|
||||
OPENJDK_TARGET_CPU_ARCH := sparc
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
@@ -209,6 +229,11 @@ ifeq ($(OPENJDK_TARGET_OS), linux)
|
||||
else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
NUM_CORES := $(shell /usr/sbin/sysctl -n hw.ncpu)
|
||||
MEMORY_SIZE := $(shell $(EXPR) `/usr/sbin/sysctl -n hw.memsize` / 1024 / 1024)
|
||||
else ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
NUM_CORES := $(shell /usr/sbin/psrinfo -v | $(GREP) -c on-line)
|
||||
MEMORY_SIZE := $(shell \
|
||||
/usr/sbin/prtconf 2> /dev/null | $(GREP) "^Memory [Ss]ize" | $(AWK) '{print $$3}' \
|
||||
)
|
||||
else ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
NUM_CORES := $(NUMBER_OF_PROCESSORS)
|
||||
MEMORY_SIZE := $(shell \
|
||||
@@ -240,6 +265,11 @@ ifneq ($(DEVKIT_HOME), )
|
||||
LD_JAOTC := $(DEVKIT_HOME)/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
|
||||
LIBRARY_PREFIX := lib
|
||||
SHARED_LIBRARY_SUFFIX := .dylib
|
||||
else ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
# Prefer system linker for AOT on Solaris.
|
||||
LD_JAOTC := ld
|
||||
LIBRARY_PREFIX := lib
|
||||
SHARED_LIBRARY_SUFFIX := .so
|
||||
endif
|
||||
else
|
||||
LD := ld
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2017, 2019, 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
|
||||
@@ -63,9 +63,8 @@ TEST_JOBS ?= 0
|
||||
|
||||
# Use hard-coded values for java flags (one size, fits all!)
|
||||
JAVA_FLAGS := -Duser.language=en -Duser.country=US
|
||||
JAVA_FLAGS_BIG := -Xms64M -Xmx1600M
|
||||
JAVA_FLAGS_SMALL := -XX:+UseSerialGC -Xms32M -Xmx512M -XX:TieredStopAtLevel=1
|
||||
BUILDJDK_JAVA_FLAGS_SMALL := -Xms32M -Xmx512M -XX:TieredStopAtLevel=1
|
||||
JAVA_FLAGS_BIG:= -Xms64M -Xmx1600M -XX:ThreadStackSize=1536
|
||||
JAVA_FLAGS_SMALL:= -XX:+UseSerialGC -Xms32M -Xmx512M -XX:TieredStopAtLevel=1
|
||||
BUILD_JAVA_FLAGS := $(JAVA_FLAGS_BIG)
|
||||
|
||||
################################################################################
|
||||
@@ -82,6 +81,7 @@ SHELL := $(BASH) $(BASH_ARGS)
|
||||
# Set some reasonable defaults for features
|
||||
DEBUG_LEVEL := release
|
||||
HOTSPOT_DEBUG_LEVEL := release
|
||||
BUILD_GTEST := true
|
||||
BUILD_FAILURE_HANDLER := true
|
||||
|
||||
################################################################################
|
||||
@@ -120,7 +120,7 @@ JARSIGNER_CMD := $(BOOT_JDK)/bin/jarsigner
|
||||
|
||||
JAVA := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
|
||||
JAVA_SMALL := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
|
||||
JAVA_DETACH := $(FIXPATH) $(FIXPATH_DETACH_FLAG) $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
|
||||
JAVA_JAVAC := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
|
||||
JAVAC := $(FIXPATH) $(JAVAC_CMD)
|
||||
JAR := $(FIXPATH) $(JAR_CMD)
|
||||
JLINK := $(FIXPATH) $(JLINK_CMD)
|
||||
@@ -177,6 +177,16 @@ FILE := file
|
||||
HG := hg
|
||||
ULIMIT := ulimit
|
||||
|
||||
# On Solaris gnu versions of some tools are required.
|
||||
ifeq ($(OPENJDK_BUILD_OS), solaris)
|
||||
AWK := gawk
|
||||
GREP := ggrep
|
||||
EGREP := ggrep -E
|
||||
FGREP := grep -F
|
||||
SED := gsed
|
||||
TAR := gtar
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_BUILD_OS), windows)
|
||||
CYGPATH := cygpath
|
||||
endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2017, 2019, 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
|
||||
@@ -35,29 +35,12 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
|
||||
$(FIXPATH_COPY): $(firstword $(FIXPATH))
|
||||
$(call install-file)
|
||||
|
||||
FIXPATH_WORKSPACE_ROOT := $(call FixPath, $(WORKSPACE_ROOT))
|
||||
FIXPATH_OUTPUTDIR := $(call FixPath, $(OUTPUTDIR))
|
||||
else
|
||||
FIXPATH_WORKSPACE_ROOT := $(WORKSPACE_ROOT)
|
||||
FIXPATH_OUTPUTDIR := $(OUTPUTDIR)
|
||||
endif
|
||||
|
||||
|
||||
BUILD_INFO_PROPERTIES := $(TEST_IMAGE_DIR)/build-info.properties
|
||||
|
||||
$(BUILD_INFO_PROPERTIES):
|
||||
$(call MakeTargetDir)
|
||||
$(ECHO) "# Build info properties for JDK tests" > $@
|
||||
$(ECHO) "build.workspace.root=$(FIXPATH_WORKSPACE_ROOT)" >> $@
|
||||
$(ECHO) "build.output.root=$(FIXPATH_OUTPUTDIR)" >> $@
|
||||
|
||||
prepare-test-image: $(FIXPATH_COPY) $(BUILD_INFO_PROPERTIES)
|
||||
prepare-test-image: $(FIXPATH_COPY)
|
||||
$(call MakeDir, $(TEST_IMAGE_DIR))
|
||||
$(ECHO) > $(TEST_IMAGE_DIR)/Readme.txt 'JDK test image'
|
||||
|
||||
################################################################################
|
||||
|
||||
all: prepare-test-image
|
||||
|
||||
.PHONY: default all prepare-test-image
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 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
|
||||
@@ -29,17 +29,18 @@ default: all
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
|
||||
################################################################################
|
||||
# Setup the compilation of the properties compilation tool. You can depend
|
||||
# upon $(BUILD_TOOLS_LANGTOOLS) to trigger a compilation of the tools.
|
||||
$(eval $(call SetupJavaCompilation, BUILD_TOOLS_LANGTOOLS, \
|
||||
COMPILER := bootjdk, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||
$(eval $(call SetupJavaCompilation,BUILD_TOOLS_LANGTOOLS, \
|
||||
SETUP := BOOT_JAVAC, \
|
||||
DISABLE_SJAVAC := true, \
|
||||
ADD_JAVAC_FLAGS := -Xprefer:source, \
|
||||
SRC := $(TOPDIR)/make/langtools/tools, \
|
||||
INCLUDES := compileproperties propertiesparser, \
|
||||
COPY := .properties, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes, \
|
||||
))
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes))
|
||||
|
||||
all: $(BUILD_TOOLS_LANGTOOLS)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2019, 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
|
||||
@@ -45,6 +45,7 @@ $(eval $(call SetupZipArchive,BUILD_SEC_BIN_ZIP, \
|
||||
modules/jdk.crypto.mscapi/sun/security/mscapi \
|
||||
modules/jdk.crypto.cryptoki/sun/security/pkcs11 \
|
||||
modules/jdk.crypto.cryptoki/sun/security/pkcs11/wrapper \
|
||||
modules/jdk.crypto.ucrypto/com/oracle/security/ucrypto \
|
||||
modules/java.base/javax/net \
|
||||
modules/java.base/javax/security/cert \
|
||||
modules/java.base/com/sun/net/ssl \
|
||||
|
||||
@@ -86,13 +86,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
|
||||
AC_SUBST(TOPDIR)
|
||||
AC_SUBST(CONFIGURE_START_DIR)
|
||||
|
||||
if test "x$CUSTOM_ROOT" != x; then
|
||||
WORKSPACE_ROOT="${CUSTOM_ROOT}"
|
||||
else
|
||||
WORKSPACE_ROOT="${TOPDIR}"
|
||||
fi
|
||||
AC_SUBST(WORKSPACE_ROOT)
|
||||
|
||||
# We can only call UTIL_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
|
||||
UTIL_FIXUP_PATH(CONFIGURE_START_DIR)
|
||||
UTIL_FIXUP_PATH(TOPDIR)
|
||||
@@ -148,8 +141,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB])
|
||||
# Corresponds to --with-msvcr-dll
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL])
|
||||
# Corresponds to --with-vcruntime-1-dll
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VCRUNTIME_1_DLL])
|
||||
# Corresponds to --with-msvcp-dll
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL])
|
||||
# Corresponds to --with-ucrt-dll-dir
|
||||
@@ -322,6 +313,11 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
AC_MSG_RESULT([in build directory with custom name])
|
||||
fi
|
||||
|
||||
if test "x$CUSTOM_ROOT" != x; then
|
||||
WORKSPACE_ROOT="${CUSTOM_ROOT}"
|
||||
else
|
||||
WORKSPACE_ROOT="${TOPDIR}"
|
||||
fi
|
||||
OUTPUTDIR="${WORKSPACE_ROOT}/build/${CONF_NAME}"
|
||||
$MKDIR -p "$OUTPUTDIR"
|
||||
if test ! -d "$OUTPUTDIR"; then
|
||||
@@ -378,6 +374,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
AC_SUBST(SPEC)
|
||||
AC_SUBST(CONF_NAME)
|
||||
AC_SUBST(OUTPUTDIR)
|
||||
AC_SUBST(WORKSPACE_ROOT)
|
||||
AC_SUBST(CONFIGURESUPPORT_OUTPUTDIR)
|
||||
|
||||
# The spec.gmk file contains all variables for the make system.
|
||||
@@ -423,16 +420,24 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
|
||||
# is the same. On older AIXes we just continue to live with a "not local build" warning.
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
DF_LOCAL_ONLY_OPTION='-T local'
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
|
||||
# In WSL, we can only build on a drvfs file system (that is, a mounted real Windows drive)
|
||||
DF_LOCAL_ONLY_OPTION='-t drvfs'
|
||||
else
|
||||
DF_LOCAL_ONLY_OPTION='-l'
|
||||
fi
|
||||
if $DF $DF_LOCAL_ONLY_OPTION $1 > /dev/null 2>&1; then
|
||||
$2
|
||||
else
|
||||
$3
|
||||
# In WSL, local Windows drives are considered remote by df, but we are
|
||||
# required to build into a directory accessible from windows, so consider
|
||||
# them local here.
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
|
||||
if $DF $1 | $GREP -q "^[[A-Z]]:"; then
|
||||
$2
|
||||
else
|
||||
$3
|
||||
fi
|
||||
else
|
||||
$3
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -97,7 +97,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
UTIL_PATH_PROGS(NICE, nice)
|
||||
|
||||
UTIL_PATH_PROGS(LSB_RELEASE, lsb_release)
|
||||
UTIL_PATH_PROGS(CMD, cmd.exe, $PATH /cygdrive/c/Windows/System32 /mnt/c/Windows/System32)
|
||||
UTIL_PATH_PROGS(CMD, [cmd.exe /mnt/c/Windows/System32/cmd.exe])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
@@ -270,15 +270,23 @@ AC_DEFUN([BASIC_CHECK_TAR],
|
||||
TAR_TYPE="bsd"
|
||||
elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
|
||||
TAR_TYPE="bsd"
|
||||
elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
|
||||
TAR_TYPE="solaris"
|
||||
elif test "x$OPENJDK_BUILD_OS" = "xaix"; then
|
||||
TAR_TYPE="aix"
|
||||
fi
|
||||
AC_MSG_CHECKING([what type of tar was found])
|
||||
AC_MSG_RESULT([$TAR_TYPE])
|
||||
|
||||
TAR_CREATE_FILE_PARAM=""
|
||||
|
||||
if test "x$TAR_TYPE" = "xgnu"; then
|
||||
TAR_INCLUDE_PARAM="T"
|
||||
TAR_SUPPORTS_TRANSFORM="true"
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
# When using gnu tar for Solaris targets, need to use compatibility mode
|
||||
TAR_CREATE_EXTRA_PARAM="--format=ustar"
|
||||
fi
|
||||
elif test "x$TAR_TYPE" = "aix"; then
|
||||
# -L InputList of aix tar: name of file listing the files and directories
|
||||
# that need to be archived or extracted
|
||||
@@ -289,6 +297,7 @@ AC_DEFUN([BASIC_CHECK_TAR],
|
||||
TAR_SUPPORTS_TRANSFORM="false"
|
||||
fi
|
||||
AC_SUBST(TAR_TYPE)
|
||||
AC_SUBST(TAR_CREATE_EXTRA_PARAM)
|
||||
AC_SUBST(TAR_INCLUDE_PARAM)
|
||||
AC_SUBST(TAR_SUPPORTS_TRANSFORM)
|
||||
])
|
||||
@@ -350,7 +359,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
UTIL_PATH_PROGS(STAT, stat)
|
||||
UTIL_PATH_PROGS(TIME, time)
|
||||
UTIL_PATH_PROGS(FLOCK, flock)
|
||||
# Dtrace is usually found in /usr/sbin, but that directory may not
|
||||
# Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
|
||||
# be in the user path.
|
||||
UTIL_PATH_PROGS(DTRACE, dtrace, $PATH:/usr/sbin)
|
||||
UTIL_PATH_PROGS(PATCH, [gpatch patch])
|
||||
@@ -406,6 +415,8 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
fi
|
||||
fi
|
||||
UTIL_REQUIRE_PROGS(SETFILE, SetFile)
|
||||
elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
UTIL_REQUIRE_PROGS(ELFEDIT, elfedit)
|
||||
fi
|
||||
if ! test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
UTIL_REQUIRE_BUILTIN_PROGS(ULIMIT, ulimit)
|
||||
|
||||
@@ -31,30 +31,18 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
|
||||
AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([Windows version])
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
[ WINDOWS_VERSION=`$CMD /c ver.exe | $EGREP -o '([0-9]+\.)+[0-9]+'` ]
|
||||
AC_MSG_RESULT([$WINDOWS_VERSION])
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
AC_MSG_CHECKING([cygwin release])
|
||||
CYGWIN_RELEASE=`$UNAME -r`
|
||||
AC_MSG_RESULT([$CYGWIN_RELEASE])
|
||||
|
||||
AC_MSG_CHECKING([cygwin version])
|
||||
CYGWIN_VERSION=`$UNAME -v`
|
||||
CYGWIN_VERSION=`$UNAME -r`
|
||||
AC_MSG_RESULT([$CYGWIN_VERSION])
|
||||
WINDOWS_ENV_VENDOR='cygwin'
|
||||
WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
|
||||
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
[ CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_RELEASE | $GREP -e '^1\.[0-6]'` ]
|
||||
CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.[0-6]'`
|
||||
if test "x$CYGWIN_VERSION_OLD" != x; then
|
||||
AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_RELEASE, but at least cygwin 1.7 is required. Please upgrade.])
|
||||
AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
WINDOWS_ENV_VENDOR='cygwin'
|
||||
WINDOWS_ENV_VERSION="$CYGWIN_RELEASE, $CYGWIN_VERSION"
|
||||
|
||||
if test "x$CYGPATH" = x; then
|
||||
AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
|
||||
fi
|
||||
@@ -71,15 +59,11 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
|
||||
fi
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
AC_MSG_CHECKING([msys release])
|
||||
MSYS_RELEASE=`$UNAME -r`
|
||||
AC_MSG_RESULT([$MSYS_RELEASE])
|
||||
|
||||
AC_MSG_CHECKING([msys version])
|
||||
MSYS_VERSION=`$UNAME -v`
|
||||
MSYS_VERSION=`$UNAME -r`
|
||||
AC_MSG_RESULT([$MSYS_VERSION])
|
||||
|
||||
WINDOWS_ENV_VENDOR='msys'
|
||||
WINDOWS_ENV_VERSION="$MSYS_RELEASE, $MSYS_VERSION"
|
||||
WINDOWS_ENV_VERSION="$MSYS_VERSION"
|
||||
|
||||
AC_MSG_CHECKING([msys root directory as unix-style path])
|
||||
# The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
|
||||
@@ -88,6 +72,10 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
|
||||
AC_MSG_RESULT([$MSYS_ROOT_PATH])
|
||||
WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
|
||||
AC_MSG_CHECKING([Windows version])
|
||||
# m4 replaces [ and ] so we use @<:@ and @:>@ instead
|
||||
WINDOWS_VERSION=`$CMD /c ver.exe | $EGREP -o '(@<:@0-9@:>@+\.)+@<:@0-9@:>@+'`
|
||||
AC_MSG_RESULT([$WINDOWS_VERSION])
|
||||
|
||||
AC_MSG_CHECKING([WSL kernel version])
|
||||
WSL_KERNEL_VERSION=`$UNAME -v`
|
||||
@@ -101,8 +89,8 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
|
||||
WSL_DISTRIBUTION=`$LSB_RELEASE -d | sed 's/Description:\t//'`
|
||||
AC_MSG_RESULT([$WSL_DISTRIBUTION])
|
||||
|
||||
WINDOWS_ENV_VENDOR='wsl'
|
||||
WINDOWS_ENV_VERSION="$WSL_KERNEL_RELEASE, $WSL_KERNEL_VERSION ($WSL_DISTRIBUTION)"
|
||||
WINDOWS_ENV_VENDOR='WSL'
|
||||
WINDOWS_ENV_VERSION="$WSL_DISTRIBUTION $WSL_KERNEL_VERSION $WSL_KERNEL_RELEASE (on Windows build $WINDOWS_VERSION)"
|
||||
else
|
||||
AC_MSG_ERROR([Unknown Windows environment. Neither cygwin, msys, nor wsl was detected.])
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2019, 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
|
||||
@@ -74,8 +74,7 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
[ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java$EXE_SUFFIX" $USER_BOOT_JDK_OPTIONS -version 2>&1 | $AWK '/version \"[0-9a-zA-Z\._\-]+\"/{print $ 0; exit;}'` ]
|
||||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java$EXE_SUFFIX" $USER_BOOT_JDK_OPTIONS -version 2>&1 | $HEAD -n 1`
|
||||
if [ [[ "$BOOT_JDK_VERSION" =~ "Picked up" ]] ]; then
|
||||
AC_MSG_NOTICE([You have _JAVA_OPTIONS or JAVA_TOOL_OPTIONS set. This can mess up the build. Please use --with-boot-jdk-jvmargs instead.])
|
||||
AC_MSG_NOTICE([Java reports: "$BOOT_JDK_VERSION".])
|
||||
@@ -346,12 +345,11 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
||||
|
||||
# When compiling code to be executed by the Boot JDK, force compatibility with the
|
||||
# oldest supported bootjdk.
|
||||
OLDEST_BOOT_JDK=`$ECHO $DEFAULT_ACCEPTABLE_BOOT_VERSIONS \
|
||||
| $TR " " "\n" | $SORT -n | $HEAD -n1`
|
||||
# -Xlint:-options is added to avoid "warning: [options] system modules path not set in conjunction with -source"
|
||||
BOOT_JDK_SOURCETARGET="-source $OLDEST_BOOT_JDK -target $OLDEST_BOOT_JDK -Xlint:-options"
|
||||
BOOT_JDK_SOURCETARGET="-source 13 -target 13"
|
||||
AC_SUBST(BOOT_JDK_SOURCETARGET)
|
||||
|
||||
AC_SUBST(JAVAC_FLAGS)
|
||||
|
||||
# Check if the boot jdk is 32 or 64 bit
|
||||
if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
|
||||
BOOT_JDK_BITS="64"
|
||||
@@ -381,22 +379,6 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
||||
BOOTJDK_USE_LOCAL_CDS=false
|
||||
AC_MSG_RESULT([no, -XX:SharedArchiveFile not supported])
|
||||
fi
|
||||
|
||||
# Check for jjs in bootjdk
|
||||
UTIL_SETUP_TOOL(JJS,
|
||||
[
|
||||
AC_MSG_CHECKING([for jjs in Boot JDK])
|
||||
JJS=$BOOT_JDK/bin/jjs
|
||||
if test ! -x $JJS; then
|
||||
AC_MSG_RESULT(not found)
|
||||
JJS=""
|
||||
AC_MSG_NOTICE([Cannot use pandoc without jjs])
|
||||
ENABLE_PANDOC=false
|
||||
else
|
||||
AC_MSG_RESULT(ok)
|
||||
fi
|
||||
AC_SUBST(JJS)
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
@@ -434,10 +416,12 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA])
|
||||
BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
|
||||
|
||||
# Maximum amount of heap memory.
|
||||
# Maximum amount of heap memory and stack size.
|
||||
JVM_HEAP_LIMIT_32="768"
|
||||
# Running a 64 bit JVM allows for and requires a bigger heap
|
||||
JVM_HEAP_LIMIT_64="1600"
|
||||
STACK_SIZE_32=768
|
||||
STACK_SIZE_64=1536
|
||||
JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
|
||||
if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
|
||||
JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
|
||||
@@ -451,11 +435,14 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
fi
|
||||
|
||||
if test "x$BOOT_JDK_BITS" = "x32"; then
|
||||
STACK_SIZE=$STACK_SIZE_32
|
||||
JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
|
||||
else
|
||||
STACK_SIZE=$STACK_SIZE_64
|
||||
JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
|
||||
fi
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xmx${JVM_MAX_HEAP}M],boot_jdk_jvmargs_big,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA])
|
||||
|
||||
AC_MSG_RESULT([$boot_jdk_jvmargs_big])
|
||||
|
||||
@@ -464,14 +451,21 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
|
||||
BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
|
||||
BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
|
||||
else
|
||||
BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
|
||||
BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
|
||||
fi
|
||||
BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
|
||||
BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
|
||||
AC_MSG_CHECKING([flags for bootcycle boot jdk java command for big workloads])
|
||||
AC_MSG_RESULT([$BOOTCYCLE_JVM_ARGS_BIG])
|
||||
AC_SUBST(BOOTCYCLE_JVM_ARGS_BIG)
|
||||
|
||||
# By default, the main javac compilations use big
|
||||
JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
|
||||
AC_SUBST(JAVA_FLAGS_JAVAC)
|
||||
|
||||
AC_MSG_CHECKING([flags for boot jdk java command for small workloads])
|
||||
|
||||
# Use serial gc for small short lived tools if possible
|
||||
@@ -485,11 +479,6 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
|
||||
AC_SUBST(JAVA_FLAGS_SMALL)
|
||||
|
||||
# Don't presuppose SerialGC is present in the buildjdk. Also, we cannot test
|
||||
# the buildjdk, but on the other hand we know what it will support.
|
||||
BUILDJDK_JAVA_FLAGS_SMALL="-Xms32M -Xmx512M -XX:TieredStopAtLevel=1"
|
||||
AC_SUBST(BUILDJDK_JAVA_FLAGS_SMALL)
|
||||
|
||||
JAVA_TOOL_FLAGS_SMALL=""
|
||||
for f in $JAVA_FLAGS_SMALL; do
|
||||
JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
|
||||
@@ -531,8 +520,7 @@ AC_DEFUN([BOOTJDK_CHECK_BUILD_JDK],
|
||||
BUILD_JDK_FOUND=no
|
||||
else
|
||||
# Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
[ BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $AWK '/version \"[0-9a-zA-Z\._\-]+\"/{print $ 0; exit;}'` ]
|
||||
BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
[FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP "\"$VERSION_FEATURE([\.+-].*)?\""`]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2017, 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
|
||||
@@ -35,6 +35,10 @@ ifeq ($(firstword $(JAVA)),$(FIXPATH))
|
||||
else
|
||||
JAVA_EXEC_POS=1
|
||||
endif
|
||||
ifneq ($(word $(JAVA_EXEC_POS),$(SJAVAC_SERVER_JAVA)),$(word $(JAVA_EXEC_POS),$(JAVA)))
|
||||
$(error Bootcycle builds are not possible if --with-sjavac-server-java is specified)
|
||||
endif
|
||||
|
||||
|
||||
# Override specific values to do a boot cycle build
|
||||
|
||||
@@ -44,19 +48,21 @@ BOOT_JDK := $(JDK_IMAGE_DIR)
|
||||
# The bootcycle build has a different output directory
|
||||
OLD_OUTPUTDIR:=@OUTPUTDIR@
|
||||
OUTPUTDIR:=$(OLD_OUTPUTDIR)/bootcycle-build
|
||||
# No spaces in patsubst to avoid leading space in variable
|
||||
JAVAC_SERVER_DIR:=$(patsubst $(OLD_OUTPUTDIR)%,$(OUTPUTDIR)%,$(JAVAC_SERVER_DIR))
|
||||
SJAVAC_SERVER_DIR:=$(patsubst $(OLD_OUTPUTDIR)%, $(OUTPUTDIR)%, $(SJAVAC_SERVER_DIR))
|
||||
|
||||
JAVA_CMD:=$(BOOT_JDK)/bin/java
|
||||
JAVAC_CMD:=$(BOOT_JDK)/bin/javac
|
||||
JAR_CMD:=$(BOOT_JDK)/bin/jar
|
||||
JARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner
|
||||
SJAVAC_SERVER_JAVA_CMD:=$(JAVA_CMD)
|
||||
# When building a 32bit target, make sure the sjavac server flags are compatible
|
||||
# with a 32bit JVM.
|
||||
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
|
||||
SJAVAC_SERVER_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
|
||||
endif
|
||||
# The bootcycle JVM arguments may differ from the original boot jdk.
|
||||
JAVA_FLAGS_BIG := @BOOTCYCLE_JVM_ARGS_BIG@
|
||||
# Any CDS settings generated for the bootjdk are invalid in the bootcycle build.
|
||||
# By filtering out those JVM args, the bootcycle JVM will use its default
|
||||
# settings for CDS.
|
||||
JAVA_FLAGS := $(filter-out -XX:SharedArchiveFile% -Xshare%, $(JAVA_FLAGS))
|
||||
|
||||
# Pandoc cannot be used without the jjs plugin, which was removed with Nashorn.
|
||||
ENABLE_PANDOC := false
|
||||
|
||||
18
make/autoconf/build-aux/config.guess
vendored
18
make/autoconf/build-aux/config.guess
vendored
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2018, 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
|
||||
@@ -30,6 +30,22 @@
|
||||
DIR=`dirname $0`
|
||||
OUT=`. $DIR/autoconf-config.guess`
|
||||
|
||||
# Test and fix solaris on x86_64
|
||||
echo $OUT | grep i386-pc-solaris > /dev/null 2> /dev/null
|
||||
if test $? = 0; then
|
||||
# isainfo -n returns either i386 or amd64
|
||||
REAL_CPU=`isainfo -n`
|
||||
OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
|
||||
fi
|
||||
|
||||
# Test and fix solaris on sparcv9
|
||||
echo $OUT | grep sparc-sun-solaris > /dev/null 2> /dev/null
|
||||
if test $? = 0; then
|
||||
# isainfo -n returns either sparc or sparcv9
|
||||
REAL_CPU=`isainfo -n`
|
||||
OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
|
||||
fi
|
||||
|
||||
# Test and fix cygwin on x86_64
|
||||
echo $OUT | grep 86-pc-cygwin > /dev/null 2> /dev/null
|
||||
if test $? != 0; then
|
||||
|
||||
@@ -32,12 +32,11 @@ AC_DEFUN([BPERF_CHECK_CORES],
|
||||
if test -f /proc/cpuinfo; then
|
||||
# Looks like a Linux (or cygwin) system
|
||||
NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
|
||||
if test "$NUM_CORES" -eq "0"; then
|
||||
NUM_CORES=`cat /proc/cpuinfo | grep -c ^CPU`
|
||||
fi
|
||||
if test "$NUM_CORES" -ne "0"; then
|
||||
FOUND_CORES=yes
|
||||
fi
|
||||
FOUND_CORES=yes
|
||||
elif test -x /usr/sbin/psrinfo; then
|
||||
# Looks like a Solaris system
|
||||
NUM_CORES=`/usr/sbin/psrinfo -v | grep -c on-line`
|
||||
FOUND_CORES=yes
|
||||
elif test -x /usr/sbin/sysctl; then
|
||||
# Looks like a MacOSX system
|
||||
NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
|
||||
@@ -75,7 +74,7 @@ AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
|
||||
MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
|
||||
FOUND_MEM=yes
|
||||
elif test -x /usr/sbin/prtconf; then
|
||||
# Looks like an AIX system
|
||||
# Looks like a Solaris or AIX system
|
||||
MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [[Ss]]ize" | awk '{ print [$]3 }'`
|
||||
FOUND_MEM=yes
|
||||
elif test -x /usr/sbin/sysctl; then
|
||||
@@ -366,6 +365,9 @@ AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
|
||||
if test "x$ICECC" != "x"; then
|
||||
AC_MSG_RESULT([no, does not work effectively with icecc])
|
||||
PRECOMPILED_HEADERS_AVAILABLE=false
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
AC_MSG_RESULT([no, does not work with Solaris Studio])
|
||||
PRECOMPILED_HEADERS_AVAILABLE=false
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
AC_MSG_RESULT([no, does not work with xlc])
|
||||
PRECOMPILED_HEADERS_AVAILABLE=false
|
||||
@@ -391,11 +393,72 @@ AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN_ONCE([BPERF_SETUP_JAVAC_SERVER],
|
||||
AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
|
||||
[
|
||||
UTIL_ARG_ENABLE(NAME: javac-server, DEFAULT: true,
|
||||
RESULT: ENABLE_JAVAC_SERVER,
|
||||
AC_ARG_WITH(sjavac-server-java, [AS_HELP_STRING([--with-sjavac-server-java],
|
||||
[use this java binary for running the sjavac background server @<:@Boot JDK java@:>@])])
|
||||
|
||||
if test "x$with_sjavac_server_java" != x; then
|
||||
SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
|
||||
FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
|
||||
if test "x$FOUND_VERSION" = x; then
|
||||
AC_MSG_ERROR([Could not execute server java: $SJAVAC_SERVER_JAVA])
|
||||
fi
|
||||
else
|
||||
SJAVAC_SERVER_JAVA="$JAVA"
|
||||
fi
|
||||
AC_SUBST(SJAVAC_SERVER_JAVA)
|
||||
|
||||
if test "$MEMORY_SIZE" -gt "3000"; then
|
||||
if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
|
||||
JVM_64BIT=true
|
||||
fi
|
||||
fi
|
||||
|
||||
MX_VALUE=`expr $MEMORY_SIZE / 2`
|
||||
if test "$JVM_64BIT" = true; then
|
||||
# Set ms lower than mx since more than one instance of the server might
|
||||
# get launched at the same time before they figure out which instance won.
|
||||
MS_VALUE=512
|
||||
if test "$MX_VALUE" -gt "2048"; then
|
||||
MX_VALUE=2048
|
||||
fi
|
||||
else
|
||||
MS_VALUE=256
|
||||
if test "$MX_VALUE" -gt "1500"; then
|
||||
MX_VALUE=1500
|
||||
fi
|
||||
fi
|
||||
if test "$MX_VALUE" -lt "512"; then
|
||||
MX_VALUE=512
|
||||
fi
|
||||
|
||||
JAVAC_SERVER_AVAILABLE=true
|
||||
SJAVAC_MEMORY_OPT="-Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
|
||||
UTIL_ADD_JVM_ARG_IF_OK([$SJAVAC_MEMORY_OPT],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA])
|
||||
if test "x$JVM_ARG_OK" = "xfalse"; then
|
||||
AC_MSG_WARN([Could not set '$SJAVAC_MEMORY_OPT' on bootjdk, disabling sjavac and javac server])
|
||||
JAVAC_SERVER_AVAILABLE=false
|
||||
fi
|
||||
AC_SUBST(SJAVAC_SERVER_JAVA_FLAGS)
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: sjavac, DEFAULT: false, AVAILABLE: $JAVAC_SERVER_AVAILABLE,
|
||||
DESC: [use sjavac to do fast incremental compiles],
|
||||
CHECKING_MSG: [whether to use sjavac],
|
||||
IF_ENABLED: [ ENABLE_SJAVAC="yes" ],
|
||||
IF_DISABLED: [ ENABLE_SJAVAC="no" ])
|
||||
AC_SUBST(ENABLE_SJAVAC)
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: javac-server, DEFAULT: true, AVAILABLE: $JAVAC_SERVER_AVAILABLE,
|
||||
DESC: [enable javac server],
|
||||
CHECKING_MSG: [whether to use javac server])
|
||||
CHECKING_MSG: [whether to use javac server],
|
||||
IF_ENABLED: [ ENABLE_JAVAC_SERVER="yes" ],
|
||||
IF_DISABLED: [ ENABLE_JAVAC_SERVER="no" ])
|
||||
AC_SUBST(ENABLE_JAVAC_SERVER)
|
||||
|
||||
if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
|
||||
# When using a server javac, the small client instances do not need much
|
||||
# resources.
|
||||
JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -91,6 +91,9 @@ DISABLE_WARNING_PREFIX := @BUILD_CC_DISABLE_WARNING_PREFIX@
|
||||
# Save speed and disk space by not enabling debug symbols for the buildjdk
|
||||
ENABLE_DEBUG_SYMBOLS := false
|
||||
|
||||
# Control whether Hotspot builds gtest tests
|
||||
BUILD_GTEST := false
|
||||
|
||||
JVM_VARIANTS := server
|
||||
JVM_VARIANT_MAIN := server
|
||||
JVM_FEATURES_server := cds compiler1 compiler2 g1gc serialgc
|
||||
|
||||
@@ -95,9 +95,6 @@ if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
export HOTSPOT_BUILD_TIME="@HOTSPOT_BUILD_TIME@"
|
||||
export USE_PRECOMPILED_HEADER="@USE_PRECOMPILED_HEADER@"
|
||||
|
||||
# Now locate the main script and run it.
|
||||
REAL_COMPARE_SCRIPT="$TOPDIR/make/scripts/compare.sh"
|
||||
if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then
|
||||
|
||||
@@ -97,9 +97,6 @@ HOTSPOT_SETUP_JVM_VARIANTS
|
||||
# With basic setup done, call the custom early hook.
|
||||
CUSTOM_EARLY_HOOK
|
||||
|
||||
# This only needs debug level to be setup
|
||||
JDKOPT_ALLOW_ABSOLUTE_PATHS_IN_OUTPUT
|
||||
|
||||
# Check if we have devkits, extra paths or sysroot set.
|
||||
BASIC_SETUP_DEVKIT
|
||||
|
||||
@@ -126,11 +123,12 @@ BASIC_SETUP_DEFAULT_LOG
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Determine OpenJDK variants and version numbers.
|
||||
# Determine OpenJDK variants, options and version numbers.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
# We need build & target for this.
|
||||
JDKOPT_SETUP_JDK_OPTIONS
|
||||
JDKOPT_SETUP_JLINK_OPTIONS
|
||||
JDKVER_SETUP_JDK_VERSION_NUMBERS
|
||||
|
||||
@@ -143,14 +141,6 @@ JDKVER_SETUP_JDK_VERSION_NUMBERS
|
||||
BOOTJDK_SETUP_BOOT_JDK
|
||||
BOOTJDK_SETUP_BUILD_JDK
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Determine JDK specific build time options.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
JDKOPT_SETUP_JDK_OPTIONS
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Configure the sources to use. We can add or override individual directories.
|
||||
@@ -234,6 +224,7 @@ LIB_SETUP_LIBRARIES
|
||||
JVM_FEATURES_PARSE_OPTIONS
|
||||
JVM_FEATURES_SETUP
|
||||
|
||||
HOTSPOT_ENABLE_DISABLE_GTEST
|
||||
HOTSPOT_SETUP_MISC
|
||||
|
||||
###############################################################################
|
||||
@@ -248,7 +239,6 @@ JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
|
||||
JDKOPT_EXCLUDE_TRANSLATIONS
|
||||
JDKOPT_ENABLE_DISABLE_MANPAGES
|
||||
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE
|
||||
JDKOPT_SETUP_REPRODUCIBLE_BUILD
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@@ -261,11 +251,13 @@ BPERF_SETUP_BUILD_CORES
|
||||
BPERF_SETUP_BUILD_MEMORY
|
||||
BPERF_SETUP_BUILD_JOBS
|
||||
BPERF_SETUP_TEST_JOBS
|
||||
BPERF_SETUP_JAVAC_SERVER
|
||||
|
||||
# Setup arguments for the boot jdk (after cores and memory have been setup)
|
||||
BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS
|
||||
|
||||
# Setup smart javac (after cores and memory have been setup)
|
||||
BPERF_SETUP_SMART_JAVAC
|
||||
|
||||
# Setup use of icecc if requested
|
||||
BPERF_SETUP_ICECC
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
||||
[
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
C_FLAG_REORDER=''
|
||||
|
||||
# Default works for linux, might work on other platforms as well.
|
||||
SHARED_LIBRARY_FLAGS='-shared'
|
||||
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
|
||||
@@ -43,6 +45,8 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
||||
SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
C_FLAG_REORDER=''
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# Linking is different on MacOSX
|
||||
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0"
|
||||
@@ -67,7 +71,16 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
||||
fi
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
C_FLAG_REORDER='-xF'
|
||||
SHARED_LIBRARY_FLAGS="-G"
|
||||
SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN[$]1'
|
||||
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
|
||||
SET_SHARED_LIBRARY_NAME='-h [$]1'
|
||||
SET_SHARED_LIBRARY_MAPFILE='-M[$]1'
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
C_FLAG_REORDER=''
|
||||
SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
|
||||
SET_EXECUTABLE_ORIGIN=""
|
||||
SET_SHARED_LIBRARY_ORIGIN=''
|
||||
@@ -75,6 +88,7 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
||||
SET_SHARED_LIBRARY_MAPFILE=''
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
C_FLAG_REORDER=''
|
||||
SHARED_LIBRARY_FLAGS="-dll"
|
||||
SET_EXECUTABLE_ORIGIN=''
|
||||
SET_SHARED_LIBRARY_ORIGIN=''
|
||||
@@ -82,6 +96,7 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
||||
SET_SHARED_LIBRARY_MAPFILE='-def:[$]1'
|
||||
fi
|
||||
|
||||
AC_SUBST(C_FLAG_REORDER)
|
||||
AC_SUBST(SET_EXECUTABLE_ORIGIN)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_NAME)
|
||||
@@ -102,6 +117,9 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
CFLAGS_DEBUG_SYMBOLS="-g"
|
||||
ASFLAGS_DEBUG_SYMBOLS="-g"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
# -g0 enables debug symbols without disabling inlining.
|
||||
CFLAGS_DEBUG_SYMBOLS="-g0 -xs"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
CFLAGS_DEBUG_SYMBOLS="-g1"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
@@ -136,6 +154,17 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
|
||||
DISABLED_WARNINGS="4800"
|
||||
;;
|
||||
|
||||
solstudio)
|
||||
DISABLE_WARNING_PREFIX="-erroff="
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="-errwarn=%all"
|
||||
|
||||
WARNINGS_ENABLE_ALL_CFLAGS="-v -fd -xtransition"
|
||||
WARNINGS_ENABLE_ALL_CXXFLAGS="+w +w2"
|
||||
|
||||
DISABLED_WARNINGS_C="E_OLD_STYLE_FUNC_DECL E_OLD_STYLE_FUNC_DEF E_SEMANTICS_OF_OP_CHG_IN_ANSI_C E_NO_REPLACEMENT_IN_STRING E_DECLARATION_IN_CODE"
|
||||
DISABLED_WARNINGS_CXX="inllargeuse inllargeint notused wemptydecl notemsource"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
DISABLE_WARNING_PREFIX="-Wno-"
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
|
||||
@@ -215,7 +244,25 @@ AC_DEFUN([FLAGS_SETUP_QUALITY_CHECKS],
|
||||
|
||||
AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
|
||||
[
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
CC_HIGHEST="-fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
|
||||
|
||||
C_O_FLAG_HIGHEST_JVM="-xO4"
|
||||
C_O_FLAG_DEBUG_JVM=""
|
||||
C_O_FLAG_SIZE=""
|
||||
C_O_FLAG_DEBUG=""
|
||||
C_O_FLAG_NONE=""
|
||||
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
|
||||
C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST"
|
||||
C_O_FLAG_HI="-xO4 -Wu,-O4~yz"
|
||||
C_O_FLAG_NORM="-xO2 -Wu,-O2~yz"
|
||||
elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
|
||||
C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 \
|
||||
-xprefetch=auto,explicit $CC_HIGHEST"
|
||||
C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
|
||||
C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
C_O_FLAG_HIGHEST_JVM="-O3"
|
||||
C_O_FLAG_HIGHEST="-O3"
|
||||
C_O_FLAG_HI="-O3"
|
||||
@@ -287,6 +334,11 @@ AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
|
||||
CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
|
||||
CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
# In solstudio, also add this to C (but not C++) flags...
|
||||
C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xalias_level=basic"
|
||||
fi
|
||||
|
||||
# Adjust optimization flags according to debug level.
|
||||
case $DEBUG_LEVEL in
|
||||
release )
|
||||
@@ -379,6 +431,9 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
CFLAGS_OS_DEF_JVM="-DLINUX"
|
||||
CFLAGS_OS_DEF_JDK="-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
CFLAGS_OS_DEF_JVM="-DSOLARIS"
|
||||
CFLAGS_OS_DEF_JDK="-D__solaris__"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
CFLAGS_OS_DEF_JVM="-D_ALLBSD_SOURCE -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
|
||||
CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
|
||||
@@ -414,6 +469,9 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
# Setup debug/release defines
|
||||
if test "x$DEBUG_LEVEL" = xrelease; then
|
||||
DEBUG_CFLAGS_JDK="-DNDEBUG"
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
DEBUG_CFLAGS_JDK="$DEBUG_CFLAGS_JDK -DTRIMMED"
|
||||
fi
|
||||
else
|
||||
DEBUG_CFLAGS_JDK="-DDEBUG"
|
||||
|
||||
@@ -436,6 +494,10 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
ALWAYS_DEFINES_JVM="-D_GNU_SOURCE -D_REENTRANT"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
ALWAYS_DEFINES_JVM="-D_GNU_SOURCE"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
ALWAYS_DEFINES_JVM="-DSPARC_WORKS -D_Crun_inline_placement"
|
||||
ALWAYS_DEFINES_JDK="-DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
|
||||
ALWAYS_DEFINES_JDK_CXXONLY="-DCC_NOEX"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
ALWAYS_DEFINES_JVM="-D_REENTRANT"
|
||||
ALWAYS_DEFINES_JDK="-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
|
||||
@@ -492,6 +554,20 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
TOOLCHAIN_CFLAGS_JDK="-pipe"
|
||||
TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
TOOLCHAIN_FLAGS="-errtags -errfmt"
|
||||
TOOLCHAIN_CFLAGS="-errshort=tags"
|
||||
|
||||
TOOLCHAIN_CFLAGS_JDK="-mt $TOOLCHAIN_FLAGS"
|
||||
TOOLCHAIN_CFLAGS_JDK_CONLY="-W0,-noglobal $TOOLCHAIN_CFLAGS" # C only
|
||||
TOOLCHAIN_CFLAGS_JDK_CXXONLY="-features=no%except -norunpath -xnolib" # CXX only
|
||||
TOOLCHAIN_CFLAGS_JVM="-template=no%extdef -features=no%split_init \
|
||||
-library=stlport4 -mt -features=no%except $TOOLCHAIN_FLAGS"
|
||||
if test "x$DEBUG_LEVEL" = xslowdebug; then
|
||||
# Previously -g was used instead of -g0 for slowdebug; this is equivalent
|
||||
# to setting +d.
|
||||
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM +d"
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
# Suggested additions: -qsrcmsg to get improved error reporting
|
||||
@@ -512,6 +588,11 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
# Explicitly set C99. clang and xlclang support the same flag.
|
||||
LANGSTD_CFLAGS="-std=c99"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
# We can't turn on -std=c99 without breaking compilation of the splashscreen/png
|
||||
# utilities. But we can enable c99 as below (previously achieved by using -Xa).
|
||||
# It is the no_lib that makes the difference.
|
||||
LANGSTD_CFLAGS="-xc99=all,no_lib"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# MSVC doesn't support C99/C11 explicitly, unless you compile as C++:
|
||||
# LANGSTD_CFLAGS="-TP"
|
||||
@@ -532,6 +613,11 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
WARNING_CFLAGS="$WARNINGS_ENABLE_ALL"
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
WARNING_CFLAGS_JDK_CONLY="$WARNINGS_ENABLE_ALL_CFLAGS"
|
||||
WARNING_CFLAGS_JDK_CXXONLY="$WARNINGS_ENABLE_ALL_CXXFLAGS"
|
||||
WARNING_CFLAGS_JVM="$WARNINGS_ENABLE_ALL_CXXFLAGS"
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
WARNING_CFLAGS="$WARNINGS_ENABLE_ALL"
|
||||
|
||||
@@ -555,7 +641,8 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
# Where does this really belong??
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
PICFLAG="-fPIC"
|
||||
PIEFLAG="-fPIE"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
PICFLAG="-KPIC"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
# '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
|
||||
# one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
|
||||
@@ -610,10 +697,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
# JDK libraries.
|
||||
STATIC_LIBS_CFLAGS="-DSTATIC_BUILD=1"
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
STATIC_LIBS_CFLAGS="$STATIC_LIBS_CFLAGS -ffunction-sections -fdata-sections \
|
||||
-DJNIEXPORT='__attribute__((visibility(\"hidden\")))'"
|
||||
else
|
||||
STATIC_LIBS_CFLAGS="$STATIC_LIBS_CFLAGS -DJNIEXPORT="
|
||||
STATIC_LIBS_CFLAGS="$STATIC_LIBS_CFLAGS -ffunction-sections -fdata-sections"
|
||||
fi
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
# Disable relax-relocation to enable compatibility with older linkers
|
||||
@@ -637,9 +721,21 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
# Setup endianness
|
||||
if test "x$FLAGS_CPU_ENDIAN" = xlittle; then
|
||||
$1_DEFINES_CPU_JVM="-DVM_LITTLE_ENDIAN"
|
||||
$1_DEFINES_CPU_JDK="-D_LITTLE_ENDIAN"
|
||||
fi
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
# The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
|
||||
# Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
|
||||
if test "x$FLAGS_CPU_ENDIAN" = xlittle; then
|
||||
$1_DEFINES_CPU_JDK="-D_LITTLE_ENDIAN="
|
||||
else
|
||||
$1_DEFINES_CPU_JDK="-D_BIG_ENDIAN="
|
||||
fi
|
||||
else
|
||||
$1_DEFINES_CPU_JDK="-D_BIG_ENDIAN"
|
||||
if test "x$FLAGS_CPU_ENDIAN" = xlittle; then
|
||||
$1_DEFINES_CPU_JDK="-D_LITTLE_ENDIAN"
|
||||
else
|
||||
$1_DEFINES_CPU_JDK="-D_BIG_ENDIAN"
|
||||
fi
|
||||
fi
|
||||
|
||||
# setup CPU bit size
|
||||
@@ -652,14 +748,19 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
if test "x$FLAGS_OS" = xlinux || test "x$FLAGS_OS" = xmacosx; then
|
||||
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_LP64=1"
|
||||
fi
|
||||
if test "x$FLAGS_OS" != xaix; then
|
||||
if test "x$FLAGS_OS" != xsolaris && test "x$FLAGS_OS" != xaix; then
|
||||
# Solaris does not have _LP64=1 in the old build.
|
||||
# xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
|
||||
$1_DEFINES_CPU_JVM="${$1_DEFINES_CPU_JVM} -D_LP64=1"
|
||||
fi
|
||||
fi
|
||||
|
||||
# toolchain dependend, per-cpu
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
if test "x$FLAGS_CPU_ARCH" = xx86; then
|
||||
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -DcpuIntel -Di586 -D$FLAGS_CPU_LEGACY_LIB"
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
if test "x$FLAGS_CPU" = xx86_64; then
|
||||
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_AMD64_ -Damd64"
|
||||
else
|
||||
@@ -677,10 +778,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
if test "x$FLAGS_CPU" = xaarch64; then
|
||||
# -Wno-psabi to get rid of annoying "note: parameter passing for argument of type '<type> changed in GCC 9.1"
|
||||
$1_CFLAGS_CPU="-Wno-psabi"
|
||||
elif test "x$FLAGS_CPU" = xarm; then
|
||||
if test "x$FLAGS_CPU" = xarm; then
|
||||
# -Wno-psabi to get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
|
||||
$1_CFLAGS_CPU="-fsigned-char -Wno-psabi $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
|
||||
$1_CFLAGS_CPU_JVM="-DARM"
|
||||
@@ -720,6 +818,15 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
fi
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
if test "x$FLAGS_CPU" = xx86_64; then
|
||||
# NOTE: -xregs=no%frameptr is supposed to be default on x64
|
||||
$1_CFLAGS_CPU_JDK="-xregs=no%frameptr"
|
||||
elif test "x$FLAGS_CPU" = xsparcv9; then
|
||||
$1_CFLAGS_CPU_JVM="-xarch=sparc"
|
||||
$1_CFLAGS_CPU_JDK_LIBONLY="-xregs=no%appl"
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
if test "x$FLAGS_CPU" = xppc64; then
|
||||
$1_CFLAGS_CPU_JVM="-qarch=ppc64"
|
||||
@@ -744,27 +851,18 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
$1_WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized"
|
||||
fi
|
||||
|
||||
# Prevent the __FILE__ macro from generating absolute paths into the built
|
||||
# binaries. Depending on toolchain, different mitigations are possible.
|
||||
# * GCC and Clang of new enough versions have -fmacro-prefix-map.
|
||||
# * For most other toolchains, supplying all source files and -I flags as
|
||||
# relative paths fixes the issue.
|
||||
FILE_MACRO_CFLAGS=
|
||||
if test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = "xfalse"; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
# Check if compiler supports -fmacro-prefix-map. If so, use that to make
|
||||
# the __FILE__ macro resolve to paths relative to the workspace root.
|
||||
workspace_root_trailing_slash="${WORKSPACE_ROOT%/}/"
|
||||
FILE_MACRO_CFLAGS="-fmacro-prefix-map=${workspace_root_trailing_slash}="
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${FILE_MACRO_CFLAGS}],
|
||||
PREFIX: $3,
|
||||
IF_FALSE: [
|
||||
FILE_MACRO_CFLAGS=
|
||||
]
|
||||
)
|
||||
fi
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
# Check if compiler supports -fmacro-prefix-map. If so, use that to make
|
||||
# the __FILE__ macro resolve to paths relative to the workspace root.
|
||||
workspace_root_trailing_slash="${WORKSPACE_ROOT%/}/"
|
||||
FILE_MACRO_CFLAGS="-fmacro-prefix-map=${workspace_root_trailing_slash}="
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${FILE_MACRO_CFLAGS}],
|
||||
PREFIX: $3,
|
||||
IF_FALSE: [
|
||||
FILE_MACRO_CFLAGS=
|
||||
]
|
||||
)
|
||||
fi
|
||||
AC_SUBST(FILE_MACRO_CFLAGS)
|
||||
|
||||
# EXPORT to API
|
||||
CFLAGS_JVM_COMMON="$ALWAYS_CFLAGS_JVM $ALWAYS_DEFINES_JVM \
|
||||
@@ -793,12 +891,10 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
|
||||
$2JVM_CFLAGS="$CFLAGS_JVM_COMMON ${$1_CFLAGS_JVM} ${$2EXTRA_CXXFLAGS}"
|
||||
|
||||
$2CFLAGS_JDKEXE="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CONLY ${$1_CFLAGS_JDK} $PIEFLAG"
|
||||
$2CXXFLAGS_JDKEXE="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CXXONLY ${$1_CFLAGS_JDK} $PIEFLAG"
|
||||
$2CFLAGS_JDKLIB="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CONLY ${$1_CFLAGS_JDK} \
|
||||
$JDK_PICFLAG ${$1_CFLAGS_CPU_JDK_LIBONLY}"
|
||||
$2CXXFLAGS_JDKLIB="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CXXONLY ${$1_CFLAGS_JDK} \
|
||||
$JDK_PICFLAG ${$1_CFLAGS_CPU_JDK_LIBONLY}"
|
||||
$2CFLAGS_JDKEXE="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CONLY ${$1_CFLAGS_JDK}"
|
||||
$2CXXFLAGS_JDKEXE="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CXXONLY ${$1_CFLAGS_JDK}"
|
||||
$2CFLAGS_JDKLIB="${$2CFLAGS_JDKEXE} $JDK_PICFLAG ${$1_CFLAGS_CPU_JDK_LIBONLY}"
|
||||
$2CXXFLAGS_JDKLIB="${$2CXXFLAGS_JDKEXE} $JDK_PICFLAG ${$1_CFLAGS_CPU_JDK_LIBONLY}"
|
||||
|
||||
AC_SUBST($2JVM_CFLAGS)
|
||||
AC_SUBST($2CFLAGS_JDKLIB)
|
||||
@@ -841,3 +937,27 @@ AC_DEFUN([FLAGS_SETUP_GCC6_COMPILER_FLAGS],
|
||||
PREFIX: $2, IF_FALSE: [NO_LIFETIME_DSE_CFLAG=""])
|
||||
$1_GCC6_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
|
||||
])
|
||||
|
||||
# Documentation on common flags used for solstudio in HIGHEST.
|
||||
#
|
||||
# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
|
||||
# done with care, there are some assumptions below that need to
|
||||
# be understood about the use of pointers, and IEEE behavior.
|
||||
#
|
||||
# -fns: Use non-standard floating point mode (not IEEE 754)
|
||||
# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
|
||||
# -fsingle: Use single precision floating point with 'float'
|
||||
# -xalias_level=basic: Assume memory references via basic pointer types do not alias
|
||||
# (Source with excessing pointer casting and data access with mixed
|
||||
# pointer types are not recommended)
|
||||
# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
|
||||
# (If you expect perfect errno behavior, do not use this)
|
||||
# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
|
||||
# -xrestrict: Pointer parameters to functions do not overlap
|
||||
# (Similar to -xalias_level=basic usage, but less obvious sometimes.
|
||||
# If you pass in multiple pointers to the same data, do not use this)
|
||||
# -xlibmil: Inline some library routines
|
||||
# (If you expect perfect errno behavior, do not use this)
|
||||
# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
|
||||
# (If you expect perfect errno behavior, do not use this)
|
||||
# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
|
||||
|
||||
@@ -69,10 +69,9 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
LIBJSIG_HASHSTYLE_LDFLAGS="-Wl,--hash-style=both"
|
||||
fi
|
||||
|
||||
# Add -z,defs, to forbid undefined symbols in object files.
|
||||
# add -z,relro (mark relocations read only) for all libs
|
||||
# add -z,now ("full relro" - more of the Global Offset Table GOT is marked read only)
|
||||
BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,-z,defs -Wl,-z,relro -Wl,-z,now"
|
||||
# Add -z defs, to forbid undefined symbols in object files.
|
||||
# add relro (mark relocations read only) for all libs
|
||||
BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,-z,defs -Wl,-z,relro"
|
||||
# Linux : remove unused code+data in link step
|
||||
if test "x$ENABLE_LINKTIME_GC" = xtrue; then
|
||||
if test "x$OPENJDK_TARGET_CPU" = xs390x; then
|
||||
@@ -88,6 +87,14 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
BASIC_LDFLAGS_JVM_ONLY="-mno-omit-leaf-frame-pointer -mstack-alignment=16 \
|
||||
-fPIC"
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
BASIC_LDFLAGS="-Wl,-z,defs"
|
||||
BASIC_LDFLAGS_ONLYCXX="-norunpath"
|
||||
BASIC_LDFLAGS_ONLYCXX_JDK_ONLY="-xnolib"
|
||||
|
||||
BASIC_LDFLAGS_JDK_ONLY="-ztext"
|
||||
BASIC_LDFLAGS_JVM_ONLY="-library=%none -mt -z noversion"
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
BASIC_LDFLAGS="-b64 -brtl -bnorwexec -bnolibpath -bexpall -bernotok -btextpsize:64K \
|
||||
-bdatapsize:64K -bstackpsize:64K"
|
||||
@@ -122,6 +129,10 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
if test x$DEBUG_LEVEL = xrelease; then
|
||||
DEBUGLEVEL_LDFLAGS_JDK_ONLY="$DEBUGLEVEL_LDFLAGS_JDK_ONLY -Wl,-O1"
|
||||
fi
|
||||
if test x$DEBUG_LEVEL = xslowdebug; then
|
||||
# do relocations at load
|
||||
DEBUGLEVEL_LDFLAGS="-Wl,-z,now"
|
||||
fi
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
@@ -133,20 +144,17 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
fi
|
||||
fi
|
||||
|
||||
# Setup warning flags
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
LDFLAGS_WARNINGS_ARE_ERRORS="-Wl,-z,fatal-warnings"
|
||||
else
|
||||
LDFLAGS_WARNINGS_ARE_ERRORS=""
|
||||
fi
|
||||
AC_SUBST(LDFLAGS_WARNINGS_ARE_ERRORS)
|
||||
|
||||
# Setup LDFLAGS for linking executables
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -Wl,--allow-shlib-undefined"
|
||||
# Enabling pie on 32 bit builds prevents the JVM from allocating a continuous
|
||||
# java heap.
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" != "x32"; then
|
||||
EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -pie"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = "xfalse"; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
BASIC_LDFLAGS="$BASIC_LDFLAGS -pdbaltpath:%_PDB%"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Export some intermediate variables for compatibility
|
||||
@@ -172,6 +180,11 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP],
|
||||
$1_CPU_LDFLAGS="$ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
if test "x${OPENJDK_$1_CPU}" = "xsparcv9"; then
|
||||
$1_CPU_LDFLAGS_JVM_ONLY="-xarch=sparc"
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
if test "x${OPENJDK_$1_CPU}" = "xx86"; then
|
||||
$1_CPU_LDFLAGS="-safeseh"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2019, 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
|
||||
@@ -47,10 +47,12 @@ AC_DEFUN([FLAGS_SETUP_STRIPFLAGS],
|
||||
[
|
||||
## Setup strip.
|
||||
# FIXME: should this really be per platform, or should it be per toolchain type?
|
||||
# strip is not provided by clang; so guessing platform makes most sense.
|
||||
# strip is not provided by clang or solstudio; so guessing platform makes most sense.
|
||||
# FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
STRIPFLAGS="-g"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
STRIPFLAGS="-x"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
STRIPFLAGS="-S"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
|
||||
@@ -205,7 +205,27 @@ AC_DEFUN_ONCE([FLAGS_SETUP_USER_SUPPLIED_FLAGS],
|
||||
AC_DEFUN([FLAGS_SETUP_SYSROOT_FLAGS],
|
||||
[
|
||||
if test "x[$]$1SYSROOT" != "x"; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
# Solaris Studio does not have a concept of sysroot. Instead we must
|
||||
# make sure the default include and lib dirs are appended to each
|
||||
# compile and link command line. Must also add -I-xbuiltin to enable
|
||||
# inlining of system functions and intrinsics.
|
||||
$1SYSROOT_CFLAGS="-I-xbuiltin -I[$]$1SYSROOT/usr/include"
|
||||
$1SYSROOT_LDFLAGS="-L[$]$1SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
|
||||
-L[$]$1SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
|
||||
# If the devkit contains the ld linker, make sure we use it.
|
||||
AC_PATH_PROG(SOLARIS_LD, ld, , $DEVKIT_TOOLCHAIN_PATH:$DEVKIT_EXTRA_PATH)
|
||||
# Make sure this ld is runnable.
|
||||
if test -f "$SOLARIS_LD"; then
|
||||
if "$SOLARIS_LD" -V > /dev/null 2> /dev/null; then
|
||||
$1SYSROOT_LDFLAGS="[$]$1SYSROOT_LDFLAGS -Yl,$(dirname $SOLARIS_LD)"
|
||||
else
|
||||
AC_MSG_WARN([Could not run $SOLARIS_LD found in devkit, reverting to system ld])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
$1SYSROOT_CFLAGS="--sysroot=[$]$1SYSROOT"
|
||||
$1SYSROOT_LDFLAGS="--sysroot=[$]$1SYSROOT"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
@@ -235,14 +255,17 @@ AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN],
|
||||
# The sysroot flags are needed for configure to be able to run the compilers
|
||||
FLAGS_SETUP_SYSROOT_FLAGS
|
||||
|
||||
# For xlc, the word size flag is required for correct behavior.
|
||||
# For solstudio and xlc, the word size flag is required for correct behavior.
|
||||
# For clang/gcc, the flag is only strictly required for reduced builds, but
|
||||
# set it always where possible (x86 and ppc).
|
||||
# set it always where possible (x86, sparc and ppc).
|
||||
if test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
MACHINE_FLAG="-q${OPENJDK_TARGET_CPU_BITS}"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86 &&
|
||||
test "x$OPENJDK_TARGET_CPU" != xx32 ||
|
||||
test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc ||
|
||||
test "x$OPENJDK_TARGET_CPU_ARCH" = xppc; then
|
||||
MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
|
||||
fi
|
||||
@@ -295,6 +318,11 @@ AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL],
|
||||
COMPILER_COMMAND_FILE_FLAG="@"
|
||||
COMPILER_BINDCMD_FILE_FLAG=""
|
||||
|
||||
# The solstudio linker does not support @-files.
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
COMPILER_COMMAND_FILE_FLAG=
|
||||
fi
|
||||
|
||||
# Check if @file is supported by gcc
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
AC_MSG_CHECKING([if @file is supported by gcc])
|
||||
@@ -348,6 +376,8 @@ AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL],
|
||||
C_FLAG_DEPS="-MMD -MF"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
C_FLAG_DEPS="-MMD -MF"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
C_FLAG_DEPS="-xMMD -xMF"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
C_FLAG_DEPS="-qmakedep=gcc -MF"
|
||||
fi
|
||||
|
||||
@@ -250,11 +250,7 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
printf "\n"
|
||||
printf "Tools summary:\n"
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION. Windows version $WINDOWS_VERSION"
|
||||
if test "x$WINDOWS_ENV_ROOT_PATH" != "x"; then
|
||||
printf ". Root at $WINDOWS_ENV_ROOT_PATH"
|
||||
fi
|
||||
printf "\n"
|
||||
printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
|
||||
fi
|
||||
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
|
||||
printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
|
||||
|
||||
@@ -111,6 +111,40 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
|
||||
AC_SUBST(JVM_VARIANT_MAIN)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if gtest should be built
|
||||
#
|
||||
AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_GTEST],
|
||||
[
|
||||
GTEST_AVAILABLE=true
|
||||
|
||||
AC_MSG_CHECKING([if Hotspot gtest test source is present])
|
||||
if test -e "${TOPDIR}/test/hotspot/gtest"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, cannot build gtest])
|
||||
GTEST_AVAILABLE=false
|
||||
fi
|
||||
|
||||
# On solaris, we also must have the libstlport.so.1 library, setup in
|
||||
# LIB_SETUP_LIBRARIES.
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
AC_MSG_CHECKING([if the libstlport.so.1 library is present])
|
||||
if test "x$STLPORT_LIB" != "x"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, cannot build gtest])
|
||||
GTEST_AVAILABLE=false
|
||||
fi
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: hotspot-gtest, DEFAULT: auto,
|
||||
RESULT: BUILD_GTEST, AVAILABLE: $GTEST_AVAILABLE,
|
||||
DEFAULT_DESC: [enabled if possible to build],
|
||||
DESC: [enable building of the Hotspot unit tests])
|
||||
AC_SUBST(BUILD_GTEST)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Misc hotspot setup that does not fit elsewhere.
|
||||
#
|
||||
@@ -123,15 +157,6 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_MISC],
|
||||
HOTSPOT_TARGET_CPU_ARCH=zero
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([hotspot-build-time], [AS_HELP_STRING([--with-hotspot-build-time],
|
||||
[timestamp to use in hotspot version string, empty for on-the-fly @<:@empty@:>@])])
|
||||
|
||||
if test "x$with_hotspot_build_time" != x; then
|
||||
HOTSPOT_BUILD_TIME="$with_hotspot_build_time"
|
||||
fi
|
||||
AC_SUBST(HOTSPOT_BUILD_TIME)
|
||||
|
||||
|
||||
# Override hotspot cpu definitions for ARM platforms
|
||||
if test "x$OPENJDK_TARGET_CPU" = xarm; then
|
||||
HOTSPOT_TARGET_CPU=arm_32
|
||||
@@ -140,7 +165,4 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_MISC],
|
||||
|
||||
# --with-cpu-port is no longer supported
|
||||
UTIL_DEPRECATED_ARG_WITH(with-cpu-port)
|
||||
|
||||
# in jdk15 hotspot-gtest was replaced with --with-gtest
|
||||
UTIL_DEPRECATED_ARG_ENABLE(hotspot-gtest)
|
||||
])
|
||||
|
||||
@@ -140,7 +140,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for pandoc])
|
||||
if test "x$ENABLE_PANDOC" = "xtrue"; then
|
||||
if test "x$PANDOC" != "x"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, cannot generate full docs])
|
||||
@@ -291,7 +291,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
|
||||
ZIP_EXTERNAL_DEBUG_SYMBOLS=false
|
||||
elif test "x$with_native_debug_symbols" = xexternal; then
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
if test "x$OBJCOPY" = x; then
|
||||
# enabling of enable-debug-symbols and can't find objcopy
|
||||
# this is an error
|
||||
@@ -304,7 +304,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
|
||||
ZIP_EXTERNAL_DEBUG_SYMBOLS=false
|
||||
elif test "x$with_native_debug_symbols" = xzipped; then
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
if test "x$OBJCOPY" = x; then
|
||||
# enabling of enable-debug-symbols and can't find objcopy
|
||||
# this is an error
|
||||
@@ -598,91 +598,3 @@ AC_DEFUN([JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE],
|
||||
])
|
||||
AC_SUBST(BUILD_CDS_ARCHIVE)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Disallow any output from containing absolute paths from the build system.
|
||||
# This setting defaults to allowed on debug builds and not allowed on release
|
||||
# builds.
|
||||
#
|
||||
AC_DEFUN([JDKOPT_ALLOW_ABSOLUTE_PATHS_IN_OUTPUT],
|
||||
[
|
||||
AC_ARG_ENABLE([absolute-paths-in-output],
|
||||
[AS_HELP_STRING([--disable-absolute-paths-in-output],
|
||||
[Set to disable to prevent any absolute paths from the build to end up in
|
||||
any of the build output. @<:@disabled in release builds, otherwise enabled@:>@])
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([if absolute paths should be allowed in the build output])
|
||||
if test "x$enable_absolute_paths_in_output" = "xno"; then
|
||||
AC_MSG_RESULT([no, forced])
|
||||
ALLOW_ABSOLUTE_PATHS_IN_OUTPUT="false"
|
||||
elif test "x$enable_absolute_paths_in_output" = "xyes"; then
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
ALLOW_ABSOLUTE_PATHS_IN_OUTPUT="true"
|
||||
elif test "x$DEBUG_LEVEL" = "xrelease"; then
|
||||
AC_MSG_RESULT([no, release build])
|
||||
ALLOW_ABSOLUTE_PATHS_IN_OUTPUT="false"
|
||||
else
|
||||
AC_MSG_RESULT([yes, debug build])
|
||||
ALLOW_ABSOLUTE_PATHS_IN_OUTPUT="true"
|
||||
fi
|
||||
|
||||
AC_SUBST(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Check and set options related to reproducible builds.
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
|
||||
[
|
||||
AC_ARG_WITH([source-date], [AS_HELP_STRING([--with-source-date],
|
||||
[how to set SOURCE_DATE_EPOCH ('updated', 'current', 'version' a timestamp or an ISO-8601 date) @<:@updated@:>@])],
|
||||
[with_source_date_present=true], [with_source_date_present=false])
|
||||
|
||||
AC_MSG_CHECKING([what source date to use])
|
||||
|
||||
if test "x$with_source_date" = xyes; then
|
||||
AC_MSG_ERROR([--with-source-date must have a value])
|
||||
elif test "x$with_source_date" = xupdated || test "x$with_source_date" = x; then
|
||||
# Tell the makefiles to update at each build
|
||||
SOURCE_DATE=updated
|
||||
AC_MSG_RESULT([determined at build time, from 'updated'])
|
||||
elif test "x$with_source_date" = xcurrent; then
|
||||
# Set the current time
|
||||
SOURCE_DATE=$($DATE +"%s")
|
||||
AC_MSG_RESULT([$SOURCE_DATE, from 'current'])
|
||||
elif test "x$with_source_date" = xversion; then
|
||||
# Use the date from version-numbers
|
||||
UTIL_GET_EPOCH_TIMESTAMP(SOURCE_DATE, $DEFAULT_VERSION_DATE)
|
||||
if test "x$SOURCE_DATE" = x; then
|
||||
AC_MSG_RESULT([unavailable])
|
||||
AC_MSG_ERROR([Cannot convert DEFAULT_VERSION_DATE to timestamp])
|
||||
fi
|
||||
AC_MSG_RESULT([$SOURCE_DATE, from 'version'])
|
||||
else
|
||||
# It's a timestamp, an ISO-8601 date, or an invalid string
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
if [ [[ "$with_source_date" =~ ^[0-9][0-9]*$ ]] ] ; then
|
||||
SOURCE_DATE=$with_source_date
|
||||
AC_MSG_RESULT([$SOURCE_DATE, from timestamp on command line])
|
||||
else
|
||||
UTIL_GET_EPOCH_TIMESTAMP(SOURCE_DATE, $with_source_date)
|
||||
if test "x$SOURCE_DATE" != x; then
|
||||
AC_MSG_RESULT([$SOURCE_DATE, from ISO-8601 date on command line])
|
||||
else
|
||||
AC_MSG_RESULT([unavailable])
|
||||
AC_MSG_ERROR([Cannot parse date string "$with_source_date"])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: reproducible-build, DEFAULT: $with_source_date_present,
|
||||
RESULT: ENABLE_REPRODUCIBLE_BUILD,
|
||||
DESC: [enable reproducible builds (not yet fully functional)],
|
||||
DEFAULT_DESC: [enabled if --with-source-date is given])
|
||||
|
||||
AC_SUBST(SOURCE_DATE)
|
||||
AC_SUBST(ENABLE_REPRODUCIBLE_BUILD)
|
||||
])
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
AC_DEFUN([JDKVER_CHECK_AND_SET_NUMBER],
|
||||
[
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
if [ ! [[ "$2" =~ ^0*([1-9][0-9]*)$|^0*(0)$ ]] ] ; then
|
||||
if [ ! [[ "$2" =~ ^0*([1-9][0-9]*)|(0)$ ]] ] ; then
|
||||
AC_MSG_ERROR(["$2" is not a valid numerical value for $1])
|
||||
fi
|
||||
# Extract the version number without leading zeros.
|
||||
|
||||
@@ -320,7 +320,8 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_JFR],
|
||||
[
|
||||
JVM_FEATURES_CHECK_AVAILABILITY(jfr, [
|
||||
AC_MSG_CHECKING([if platform is supported by JFR])
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix || \
|
||||
test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-sparcv9"; then
|
||||
AC_MSG_RESULT([no, $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
|
||||
AVAILABLE=false
|
||||
else
|
||||
@@ -446,6 +447,10 @@ AC_DEFUN_ONCE([JVM_FEATURES_PREPARE_PLATFORM],
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
JVM_FEATURES_PLATFORM_FILTER="$JVM_FEATURES_PLATFORM_FILTER jfr"
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-sparcv9"; then
|
||||
JVM_FEATURES_PLATFORM_FILTER="$JVM_FEATURES_PLATFORM_FILTER jfr"
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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
|
||||
@@ -53,6 +53,13 @@ AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
|
||||
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
|
||||
AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location.])
|
||||
FOUND_FREETYPE=no
|
||||
else
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris" \
|
||||
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
|
||||
# Found lib in isa dir, use that instead.
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
|
||||
AC_MSG_NOTICE([Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -72,7 +79,7 @@ AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
|
||||
AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
|
||||
[
|
||||
AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
|
||||
[specify whether to use 'system' or 'bundled' freetype.
|
||||
[specify whether to use 'system' or 'bundled' freetype. Other values are errors.
|
||||
The selected option applies to both build time and run time.
|
||||
The default behaviour can be platform dependent.
|
||||
If using 'system' and either the include files or libraries cannot be
|
||||
@@ -83,83 +90,78 @@ AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
|
||||
AC_ARG_WITH(freetype-lib, [AS_HELP_STRING([--with-freetype-lib],
|
||||
[specify directory for the freetype library])])
|
||||
|
||||
# This setup is to verify access to system installed freetype header and
|
||||
# libraries. On Windows and MacOS this does not apply and using these options
|
||||
# will report an error. On other platforms they will default to using the
|
||||
# system libraries. If they are found automatically, nothing need be done.
|
||||
# If they are not found, the configure "--with-freetype-*" options may be
|
||||
# used to fix that. If the preference is to bundle on these platforms then
|
||||
# use --with-freetype=bundled.
|
||||
|
||||
# This setup is to verify access to system installed freetype header and libraries.
|
||||
# On Windows and MacOS this does not apply and using these options will report an error.
|
||||
# On other platforms (Linux, Solaris), they will default to using
|
||||
# the system libraries. If they are found automatically, nothing need be done.
|
||||
# If they are not found, the configure "--with-freetype-*" options may be used to fix that.
|
||||
# If the preference is to bundle on these platforms then use --with-freetype=bundled
|
||||
FREETYPE_BASE_NAME=freetype
|
||||
FREETYPE_CFLAGS=
|
||||
FREETYPE_LIBS=
|
||||
|
||||
if (test "x$with_freetype_include" = "x" && test "x$with_freetype_lib" != "x") || \
|
||||
(test "x$with_freetype_include" != "x" && test "x$with_freetype_lib" = "x"); then
|
||||
AC_MSG_ERROR([Must specify both or neither of --with-freetype-include and --with-freetype-lib])
|
||||
if (test "x$with_freetype_include" = "x" && test "x$with_freetype_lib" != "x") || \
|
||||
(test "x$with_freetype_include" != "x" && test "x$with_freetype_lib" = "x"); then
|
||||
AC_MSG_ERROR(['must specify both or neither of --with-freetype-include and --with-freetype-lib])
|
||||
fi
|
||||
|
||||
FREETYPE_TO_USE=bundled
|
||||
if test "x$OPENJDK_TARGET_OS" != "xwindows" && \
|
||||
test "x$OPENJDK_TARGET_OS" != "xmacosx" && \
|
||||
test "x$OPENJDK_TARGET_OS" != "xaix"; then
|
||||
if (test "x$OPENJDK_TARGET_OS" != "xwindows" && test "x$OPENJDK_TARGET_OS" != "xmacosx" \
|
||||
&& test "x$OPENJDK_TARGET_OS" != "xaix"); then
|
||||
FREETYPE_TO_USE=system
|
||||
fi
|
||||
if test "x$with_freetype" != "x" ; then
|
||||
if test "x$with_freetype" = "xsystem" ; then
|
||||
if (test "x$with_freetype" != "x"); then
|
||||
if (test "x$with_freetype" = "xsystem"); then
|
||||
FREETYPE_TO_USE=system
|
||||
elif test "x$with_freetype" = "xbundled" ; then
|
||||
elif (test "x$with_freetype" = "xbundled"); then
|
||||
FREETYPE_TO_USE=bundled
|
||||
if test "x$with_freetype_include" != "x" || \
|
||||
test "x$with_freetype_lib" != "x" ; then
|
||||
if (test "x$with_freetype_include" != "x" || test "x$with_freetype_lib" != "x"); then
|
||||
AC_MSG_ERROR(['bundled' cannot be specified with --with-freetype-include and --with-freetype-lib])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([Valid values for --with-freetype are 'system' and 'bundled'])
|
||||
AC_MSG_ERROR(['valid values for --with-freetype are 'system' and 'bundled'])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$with_freetype_include" != "x" && \
|
||||
test "x$with_freetype_lib" != "x" ; then
|
||||
FREETYPE_TO_USE=system
|
||||
if (test "x$with_freetype_include" != "x" && test "x$with_freetype_lib" != "x"); then
|
||||
FREETYPE_TO_USE=system
|
||||
fi
|
||||
|
||||
if test "x$FREETYPE_TO_USE" = "xsystem" && \
|
||||
(test "x$OPENJDK_TARGET_OS" = "xwindows" || \
|
||||
test "x$OPENJDK_TARGET_OS" = "xmacosx"); then
|
||||
AC_MSG_ERROR([Only bundled freetype can be specified on Mac and Windows])
|
||||
if (test "x$FREETYPE_TO_USE" = "xsystem") && \
|
||||
(test "x$OPENJDK_TARGET_OS" = "xwindows" || test "x$OPENJDK_TARGET_OS" = "xmacosx"); then
|
||||
AC_MSG_ERROR([Only bundled freetype can be specified on Mac and Windows])
|
||||
fi
|
||||
|
||||
if test "x$with_freetype_include" != "x" ; then
|
||||
if (test "x$with_freetype_include" != "x"); then
|
||||
POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
|
||||
fi
|
||||
if test "x$with_freetype_lib" != "x" ; then
|
||||
if (test "x$with_freetype_lib" != "x"); then
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
|
||||
fi
|
||||
|
||||
if test "x$FREETYPE_TO_USE" = "xsystem" ; then
|
||||
if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != "x" && \
|
||||
test "x$POTENTIAL_FREETYPE_LIB_PATH" != "x" ; then
|
||||
if (test "x$FREETYPE_TO_USE" = "xsystem"); then
|
||||
if (test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != "x" && test "x$POTENTIAL_FREETYPE_LIB_PATH" != "x"); then
|
||||
# Okay, we got it. Check that it works.
|
||||
LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH,
|
||||
$POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype])
|
||||
if test "x$FOUND_FREETYPE" != "xyes" ; then
|
||||
LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype])
|
||||
if (test "x$FOUND_FREETYPE" != "xyes"); then
|
||||
AC_MSG_ERROR([Can not find or use freetype at location given by --with-freetype-lib|include])
|
||||
fi
|
||||
else
|
||||
# User did not specify a location, but asked for system freetype.
|
||||
# Try to locate it.
|
||||
# User did not specify a location, but asked for system freetype. Try to locate it.
|
||||
|
||||
# If we have a sysroot, assume that's where we are supposed to look and
|
||||
# skip pkg-config.
|
||||
if test "x$SYSROOT" = "x" ; then
|
||||
if test "x$FOUND_FREETYPE" != "xyes" ; then
|
||||
# Check modules using pkg-config, but only if we have it (ugly output
|
||||
# results otherwise)
|
||||
if test "x$PKG_CONFIG" != "x" ; then
|
||||
# If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
|
||||
if (test "x$SYSROOT" = "x"); then
|
||||
if (test "x$FOUND_FREETYPE" != "xyes"); then
|
||||
# Check modules using pkg-config, but only if we have it (ugly output results otherwise)
|
||||
if (test "x$PKG_CONFIG" != "x"); then
|
||||
PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
|
||||
if test "x$FOUND_FREETYPE" = "xyes" ; then
|
||||
if (test "x$FOUND_FREETYPE" = "xyes"); then
|
||||
# On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
|
||||
FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
|
||||
# 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
|
||||
if (test "x$OPENJDK_TARGET_OS" = "xsolaris" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"); then
|
||||
FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
|
||||
fi
|
||||
AC_MSG_CHECKING([for freetype])
|
||||
AC_MSG_RESULT([yes (using pkg-config)])
|
||||
fi
|
||||
@@ -167,65 +169,59 @@ AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FOUND_FREETYPE" != "xyes" ; then
|
||||
if (test "x$FOUND_FREETYPE" != "xyes"); then
|
||||
# Check in well-known locations
|
||||
FREETYPE_BASE_DIR="$SYSROOT/usr"
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
|
||||
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" ; then
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include],
|
||||
[$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu], [well-known location])
|
||||
if test "x$FOUND_FREETYPE" != "xyes" ; then
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include],
|
||||
[$FREETYPE_BASE_DIR/lib64], [well-known location])
|
||||
fi
|
||||
else
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include],
|
||||
[$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location])
|
||||
if test "x$FOUND_FREETYPE" != "xyes" ; then
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include],
|
||||
[$FREETYPE_BASE_DIR/lib32], [well-known location])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FOUND_FREETYPE" != "xyes" ; then
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include],
|
||||
[$FREETYPE_BASE_DIR/lib], [well-known location])
|
||||
fi
|
||||
|
||||
if test "x$FOUND_FREETYPE" != "xyes" ; then
|
||||
if (test "x$FOUND_FREETYPE" != "xyes"); then
|
||||
FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include],
|
||||
[$FREETYPE_BASE_DIR/lib], [well-known location])
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
|
||||
fi
|
||||
if (test "x$FOUND_FREETYPE" != "xyes"); then
|
||||
FREETYPE_BASE_DIR="$SYSROOT/usr/local"
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
|
||||
fi
|
||||
|
||||
if test "x$FOUND_FREETYPE" != "xyes" ; then
|
||||
FREETYPE_BASE_DIR="$SYSROOT/usr/local"
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include],
|
||||
[$FREETYPE_BASE_DIR/lib], [well-known location])
|
||||
if (test "x$FOUND_FREETYPE" != "xyes"); then
|
||||
FREETYPE_BASE_DIR="$SYSROOT/usr"
|
||||
if (test "x$OPENJDK_TARGET_CPU_BITS" = "x64"); then
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu], [well-known location])
|
||||
if (test "x$FOUND_FREETYPE" != "xyes"); then
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib64], [well-known location])
|
||||
fi
|
||||
else
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location])
|
||||
if (test "x$FOUND_FREETYPE" != "xyes"); then
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi # end check in well-known locations
|
||||
|
||||
if test "x$FOUND_FREETYPE" != "xyes" ; then
|
||||
if (test "x$FOUND_FREETYPE" != "xyes"); then
|
||||
HELP_MSG_MISSING_DEPENDENCY([freetype])
|
||||
AC_MSG_ERROR([Could not find freetype! $HELP_MSG ])
|
||||
fi
|
||||
fi # end user specified settings
|
||||
|
||||
# Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
|
||||
if test "x$FREETYPE_CFLAGS" = "x" ; then
|
||||
if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype ; then
|
||||
if (test "x$FREETYPE_CFLAGS" = "x"); then
|
||||
if (test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype); then
|
||||
FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
|
||||
else
|
||||
FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FREETYPE_LIBS" = "x" ; then
|
||||
if (test "x$FREETYPE_LIBS" = "x"); then
|
||||
FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([Using freetype: $FREETYPE_TO_USE])
|
||||
|
||||
AC_MSG_RESULT([Using freetype: $FREETYPE_TO_USE])
|
||||
|
||||
|
||||
AC_SUBST(FREETYPE_TO_USE)
|
||||
AC_SUBST(FREETYPE_CFLAGS)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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
|
||||
@@ -77,6 +77,14 @@ AC_DEFUN_ONCE([LIB_SETUP_STD_LIBS],
|
||||
fi
|
||||
fi
|
||||
|
||||
# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
|
||||
LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
|
||||
fi
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
LIBCXX_JVM="-lCrun"
|
||||
fi
|
||||
|
||||
AC_SUBST(LIBCXX)
|
||||
|
||||
# Setup Windows runtime dlls
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2018, 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
|
||||
@@ -55,40 +55,6 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_GRAALUNIT],
|
||||
AC_SUBST(GRAALUNIT_LIB)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Setup and check for gtest framework source files
|
||||
#
|
||||
AC_DEFUN_ONCE([LIB_TESTS_SETUP_GTEST],
|
||||
[
|
||||
AC_ARG_WITH(gtest, [AS_HELP_STRING([--with-gtest],
|
||||
[specify prefix directory for the gtest framework])])
|
||||
|
||||
if test "x${with_gtest}" != x; then
|
||||
AC_MSG_CHECKING([for gtest])
|
||||
if test "x${with_gtest}" = xno; then
|
||||
AC_MSG_RESULT([no, disabled])
|
||||
elif test "x${with_gtest}" = xyes; then
|
||||
AC_MSG_RESULT([no, error])
|
||||
AC_MSG_ERROR([--with-gtest must have a value])
|
||||
else
|
||||
if ! test -s "${with_gtest}/googletest/include/gtest/gtest.h"; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Can't find 'googletest/include/gtest/gtest.h' under ${with_gtest} given with the --with-gtest option.])
|
||||
elif ! test -s "${with_gtest}/googlemock/include/gmock/gmock.h"; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Can't find 'googlemock/include/gmock/gmock.h' under ${with_gtest} given with the --with-gtest option.])
|
||||
else
|
||||
GTEST_FRAMEWORK_SRC=${with_gtest}
|
||||
AC_MSG_RESULT([$GTEST_FRAMEWORK_SRC])
|
||||
UTIL_FIXUP_PATH([GTEST_FRAMEWORK_SRC])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(GTEST_FRAMEWORK_SRC)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Setup and check the Java Microbenchmark Harness
|
||||
@@ -111,8 +77,6 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_JMH],
|
||||
AC_MSG_RESULT([no, error])
|
||||
AC_MSG_ERROR([$JMH_HOME does not exist or is not a directory])
|
||||
fi
|
||||
AC_MSG_RESULT([yes, $JMH_HOME])
|
||||
|
||||
UTIL_FIXUP_PATH([JMH_HOME])
|
||||
|
||||
jar_names="jmh-core jmh-generator-annprocess jopt-simple commons-math3"
|
||||
@@ -120,14 +84,17 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_JMH],
|
||||
found_jar_files=$($ECHO $(ls $JMH_HOME/$jar-*.jar 2> /dev/null))
|
||||
|
||||
if test "x$found_jar_files" = x; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([--with-jmh does not contain $jar-*.jar])
|
||||
elif ! test -e "$found_jar_files"; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([--with-jmh contain multiple $jar-*.jar: $found_jar_files])
|
||||
fi
|
||||
|
||||
found_jar_var_name=found_${jar//-/_}
|
||||
eval $found_jar_var_name='"'$found_jar_files'"'
|
||||
done
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
JMH_CORE_JAR=$found_jmh_core
|
||||
JMH_GENERATOR_JAR=$found_jmh_generator_annprocess
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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
|
||||
@@ -88,6 +88,13 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
|
||||
AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
OPENWIN_HOME="/usr/openwin"
|
||||
X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
|
||||
X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
|
||||
-R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
|
||||
fi
|
||||
|
||||
AC_LANG_PUSH(C)
|
||||
OLD_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
|
||||
@@ -115,6 +122,16 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
|
||||
AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h Xrandr.h XTest.h Intrinsic.h). $HELP_MSG])
|
||||
fi
|
||||
|
||||
# If XLinearGradient isn't available in Xrender.h, signal that it needs to be
|
||||
# defined in libawt_xawt.
|
||||
AC_MSG_CHECKING([if XlinearGradient is defined in Xrender.h])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <X11/extensions/Xrender.h>]],
|
||||
[[XLinearGradient x;]])],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])
|
||||
X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"])
|
||||
|
||||
CFLAGS="$OLD_CFLAGS"
|
||||
AC_LANG_POP(C)
|
||||
fi # NEEDS_LIB_X11
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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
|
||||
@@ -101,8 +101,14 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
|
||||
LIB_SETUP_LIBFFI
|
||||
LIB_SETUP_BUNDLED_LIBS
|
||||
LIB_SETUP_MISC_LIBS
|
||||
LIB_SETUP_SOLARIS_STLPORT
|
||||
LIB_TESTS_SETUP_GRAALUNIT
|
||||
LIB_TESTS_SETUP_GTEST
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
GLOBAL_LIBS="-lc"
|
||||
else
|
||||
GLOBAL_LIBS=""
|
||||
fi
|
||||
|
||||
BASIC_JDKLIB_LIBS=""
|
||||
if test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
|
||||
@@ -113,13 +119,15 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
|
||||
BASIC_JVM_LIBS="$LIBM"
|
||||
|
||||
# Dynamic loading library
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBDL"
|
||||
fi
|
||||
|
||||
# Threading library
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lpthread"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lthread"
|
||||
fi
|
||||
|
||||
# perfstat lib
|
||||
@@ -127,6 +135,12 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lperfstat"
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lsocket -lsched -ldoor -ldemangle -lnsl \
|
||||
-lrt -lkstat"
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBCXX_JVM"
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
|
||||
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
|
||||
@@ -144,6 +158,7 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
|
||||
AC_SUBST(JVM_LIBS)
|
||||
AC_SUBST(OPENJDK_BUILD_JDKLIB_LIBS)
|
||||
AC_SUBST(OPENJDK_BUILD_JVM_LIBS)
|
||||
AC_SUBST(GLOBAL_LIBS)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
@@ -174,3 +189,28 @@ AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
|
||||
LIBZIP_CAN_USE_MMAP=true
|
||||
AC_SUBST(LIBZIP_CAN_USE_MMAP)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# libstlport.so.1 is needed for running gtest on Solaris. Find it to
|
||||
# redistribute it in the test image.
|
||||
################################################################################
|
||||
AC_DEFUN_ONCE([LIB_SETUP_SOLARIS_STLPORT],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
# Find the root of the Solaris Studio installation from the compiler path
|
||||
SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
|
||||
STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
|
||||
AC_MSG_CHECKING([for libstlport.so.1])
|
||||
if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
|
||||
# SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
|
||||
STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
|
||||
fi
|
||||
if test -f "$STLPORT_LIB"; then
|
||||
AC_MSG_RESULT([yes, $STLPORT_LIB])
|
||||
UTIL_FIXUP_PATH([STLPORT_LIB])
|
||||
else
|
||||
AC_MSG_RESULT([no, not found at $STLPORT_LIB, cannot build Hotspot gtests])
|
||||
fi
|
||||
AC_SUBST(STLPORT_LIB)
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -120,12 +120,6 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=little
|
||||
;;
|
||||
riscv64)
|
||||
VAR_CPU=riscv64
|
||||
VAR_CPU_ARCH=riscv
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=little
|
||||
;;
|
||||
s390)
|
||||
VAR_CPU=s390
|
||||
VAR_CPU_ARCH=s390
|
||||
@@ -162,18 +156,6 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=big
|
||||
;;
|
||||
sparc)
|
||||
VAR_CPU=sparc
|
||||
VAR_CPU_ARCH=sparc
|
||||
VAR_CPU_BITS=32
|
||||
VAR_CPU_ENDIAN=big
|
||||
;;
|
||||
sparcv9|sparc64)
|
||||
VAR_CPU=sparcv9
|
||||
VAR_CPU_ARCH=sparc
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=big
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([unsupported cpu $1])
|
||||
;;
|
||||
@@ -190,6 +172,10 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
|
||||
VAR_OS=linux
|
||||
VAR_OS_TYPE=unix
|
||||
;;
|
||||
*solaris*)
|
||||
VAR_OS=solaris
|
||||
VAR_OS_TYPE=unix
|
||||
;;
|
||||
*darwin*)
|
||||
VAR_OS=macosx
|
||||
VAR_OS_TYPE=unix
|
||||
@@ -389,6 +375,19 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
|
||||
fi
|
||||
AC_SUBST(OPENJDK_$1_CPU_LEGACY_LIB)
|
||||
|
||||
# OPENJDK_$1_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
|
||||
# /amd64 or /sparcv9. This string is appended to some library paths, like this:
|
||||
# /usr/lib${OPENJDK_$1_CPU_ISADIR}/libexample.so
|
||||
OPENJDK_$1_CPU_ISADIR=""
|
||||
if test "x$OPENJDK_$1_OS" = xsolaris; then
|
||||
if test "x$OPENJDK_$1_CPU" = xx86_64; then
|
||||
OPENJDK_$1_CPU_ISADIR="/amd64"
|
||||
elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
|
||||
OPENJDK_$1_CPU_ISADIR="/sparcv9"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(OPENJDK_$1_CPU_ISADIR)
|
||||
|
||||
# Setup OPENJDK_$1_CPU_OSARCH, which is used to set the os.arch Java system property
|
||||
OPENJDK_$1_CPU_OSARCH="$OPENJDK_$1_CPU"
|
||||
if test "x$OPENJDK_$1_OS" = xlinux && test "x$OPENJDK_$1_CPU" = xx86; then
|
||||
@@ -486,8 +485,6 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
|
||||
HOTSPOT_$1_CPU_DEFINE=S390
|
||||
elif test "x$OPENJDK_$1_CPU" = xs390x; then
|
||||
HOTSPOT_$1_CPU_DEFINE=S390
|
||||
elif test "x$OPENJDK_$1_CPU" = xriscv64; then
|
||||
HOTSPOT_$1_CPU_DEFINE=RISCV
|
||||
elif test "x$OPENJDK_$1_CPU" != x; then
|
||||
HOTSPOT_$1_CPU_DEFINE=$(echo $OPENJDK_$1_CPU | tr a-z A-Z)
|
||||
fi
|
||||
@@ -505,6 +502,9 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
|
||||
|
||||
AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
RELEASE_FILE_OS_NAME=SunOS
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
|
||||
RELEASE_FILE_OS_NAME=Linux
|
||||
fi
|
||||
@@ -558,9 +558,25 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
|
||||
PLATFORM_SET_MODULE_TARGET_OS_VALUES
|
||||
PLATFORM_SET_RELEASE_FILE_OS_VALUES
|
||||
PLATFORM_SETUP_LEGACY_VARS
|
||||
PLATFORM_CHECK_DEPRECATION
|
||||
])
|
||||
|
||||
# Deprecated in JDK 15
|
||||
UTIL_DEPRECATED_ARG_ENABLE(deprecated-ports)
|
||||
AC_DEFUN([PLATFORM_CHECK_DEPRECATION],
|
||||
[
|
||||
UTIL_ARG_ENABLE(NAME: deprecated-ports, DEFAULT: false,
|
||||
RESULT: ENABLE_DEPRECATED_PORTS,
|
||||
DESC: [suppress the error when configuring for a deprecated port])
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris || \
|
||||
(test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc && \
|
||||
test "x$with_jvm_variants" != xzero); then
|
||||
if test "x$ENABLE_DEPRECATED_PORTS" = "xtrue"; then
|
||||
AC_MSG_WARN([The Solaris and SPARC ports are deprecated and may be removed in a future release.])
|
||||
else
|
||||
AC_MSG_ERROR(m4_normalize([The Solaris and SPARC ports are deprecated and may be removed in a
|
||||
future release. Use --enable-deprecated-ports=yes to suppress this error.]))
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
|
||||
|
||||
@@ -83,6 +83,7 @@ OPENJDK_TARGET_CPU_ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
|
||||
COMPILE_TYPE:=@COMPILE_TYPE@
|
||||
|
||||
# Legacy support
|
||||
OPENJDK_TARGET_CPU_ISADIR:=@OPENJDK_TARGET_CPU_ISADIR@
|
||||
OPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@
|
||||
OPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@
|
||||
OPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@
|
||||
@@ -118,9 +119,6 @@ OPENJDK_MODULE_TARGET_PLATFORM:=@OPENJDK_MODULE_TARGET_PLATFORM@
|
||||
RELEASE_FILE_OS_NAME:=@RELEASE_FILE_OS_NAME@
|
||||
RELEASE_FILE_OS_ARCH:=@RELEASE_FILE_OS_ARCH@
|
||||
|
||||
SOURCE_DATE := @SOURCE_DATE@
|
||||
ENABLE_REPRODUCIBLE_BUILD := @ENABLE_REPRODUCIBLE_BUILD@
|
||||
|
||||
LIBM:=@LIBM@
|
||||
LIBDL:=@LIBDL@
|
||||
|
||||
@@ -158,7 +156,6 @@ IMPORT_MODULES_SRC:=@IMPORT_MODULES_SRC@
|
||||
IMPORT_MODULES_MAKE:=@IMPORT_MODULES_MAKE@
|
||||
|
||||
COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
|
||||
HOTSPOT_BUILD_TIME:=@HOTSPOT_BUILD_TIME@
|
||||
|
||||
# Platform naming variables
|
||||
LAUNCHER_NAME:=@LAUNCHER_NAME@
|
||||
@@ -248,7 +245,7 @@ ifneq ($(COMPANY_NAME),)
|
||||
# Only export "VENDOR" to the build if COMPANY_NAME contains a real value.
|
||||
# Otherwise the default value for VENDOR, which is used to set the "java.vendor"
|
||||
# and "java.vm.vendor" properties is hard-coded into the source code (i.e. in
|
||||
# VersionProps.java.template in the jdk for "java.vendor" and
|
||||
# VersionProps.java.template in the jdk for "vm.vendor" and
|
||||
# vm_version.cpp in the VM for "java.vm.vendor")
|
||||
ifneq ($(COMPANY_NAME), N/A)
|
||||
VERSION_CFLAGS += -DVENDOR='"$(COMPANY_NAME)"'
|
||||
@@ -292,6 +289,9 @@ JVM_FEATURES_custom := @JVM_FEATURES_custom@
|
||||
VALID_JVM_FEATURES := @VALID_JVM_FEATURES@
|
||||
VALID_JVM_VARIANTS := @VALID_JVM_VARIANTS@
|
||||
|
||||
# Control whether Hotspot builds gtest tests
|
||||
BUILD_GTEST := @BUILD_GTEST@
|
||||
|
||||
# Allow overriding the default hotspot library path
|
||||
HOTSPOT_OVERRIDE_LIBPATH := @HOTSPOT_OVERRIDE_LIBPATH@
|
||||
|
||||
@@ -337,8 +337,6 @@ BUILD_MANPAGES := @BUILD_MANPAGES@
|
||||
|
||||
BUILD_CDS_ARCHIVE := @BUILD_CDS_ARCHIVE@
|
||||
|
||||
ALLOW_ABSOLUTE_PATHS_IN_OUTPUT := @ALLOW_ABSOLUTE_PATHS_IN_OUTPUT@
|
||||
|
||||
# The boot jdk to use. This is overridden in bootcycle-spec.gmk. Make sure to keep
|
||||
# it in sync.
|
||||
BOOT_JDK:=@BOOT_JDK@
|
||||
@@ -354,10 +352,13 @@ BOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
|
||||
# Information about the build system
|
||||
NUM_CORES:=@NUM_CORES@
|
||||
MEMORY_SIZE:=@MEMORY_SIZE@
|
||||
# Enable sjavac support = use a javac server,
|
||||
# multi core javac compilation and dependency tracking.
|
||||
ENABLE_SJAVAC:=@ENABLE_SJAVAC@
|
||||
ENABLE_JAVAC_SERVER:=@ENABLE_JAVAC_SERVER@
|
||||
# Store javac server synchronization files here, and
|
||||
# the javac server log files.
|
||||
JAVAC_SERVER_DIR=$(MAKESUPPORT_OUTPUTDIR)/javacservers
|
||||
# Store sjavac server synchronization files here, and
|
||||
# the sjavac server log files.
|
||||
SJAVAC_SERVER_DIR=$(MAKESUPPORT_OUTPUTDIR)/javacservers
|
||||
|
||||
# Number of parallel jobs to use for compilation
|
||||
JOBS?=@JOBS@
|
||||
@@ -379,7 +380,6 @@ LIBFFI_CFLAGS:=@LIBFFI_CFLAGS@
|
||||
ENABLE_LIBFFI_BUNDLING:=@ENABLE_LIBFFI_BUNDLING@
|
||||
LIBFFI_LIB_FILE:=@LIBFFI_LIB_FILE@
|
||||
GRAALUNIT_LIB := @GRAALUNIT_LIB@
|
||||
FILE_MACRO_CFLAGS := @FILE_MACRO_CFLAGS@
|
||||
|
||||
STATIC_LIBS_CFLAGS := @STATIC_LIBS_CFLAGS@
|
||||
|
||||
@@ -389,8 +389,6 @@ JMH_JOPT_SIMPLE_JAR := @JMH_JOPT_SIMPLE_JAR@
|
||||
JMH_COMMONS_MATH_JAR := @JMH_COMMONS_MATH_JAR@
|
||||
JMH_VERSION := @JMH_VERSION@
|
||||
|
||||
GTEST_FRAMEWORK_SRC := @GTEST_FRAMEWORK_SRC@
|
||||
|
||||
# Source file for cacerts
|
||||
CACERTS_FILE=@CACERTS_FILE@
|
||||
|
||||
@@ -425,7 +423,7 @@ MACOSX_VERSION_MAX=@MACOSX_VERSION_MAX@
|
||||
# The macosx code signing identity to use
|
||||
MACOSX_CODESIGN_IDENTITY=@MACOSX_CODESIGN_IDENTITY@
|
||||
|
||||
# Toolchain type: gcc, clang, xlc, microsoft...
|
||||
# Toolchain type: gcc, clang, solstudio, lxc, microsoft...
|
||||
TOOLCHAIN_TYPE:=@TOOLCHAIN_TYPE@
|
||||
TOOLCHAIN_VERSION := @TOOLCHAIN_VERSION@
|
||||
CC_VERSION_NUMBER := @CC_VERSION_NUMBER@
|
||||
@@ -468,6 +466,7 @@ CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
|
||||
|
||||
DISABLE_WARNING_PREFIX := @DISABLE_WARNING_PREFIX@
|
||||
CFLAGS_WARNINGS_ARE_ERRORS:=@CFLAGS_WARNINGS_ARE_ERRORS@
|
||||
LDFLAGS_WARNINGS_ARE_ERRORS:=@LDFLAGS_WARNINGS_ARE_ERRORS@
|
||||
DISABLED_WARNINGS := @DISABLED_WARNINGS@
|
||||
DISABLED_WARNINGS_C := @DISABLED_WARNINGS_C@
|
||||
DISABLED_WARNINGS_CXX := @DISABLED_WARNINGS_CXX@
|
||||
@@ -521,6 +520,7 @@ SDKROOT:=@SDKROOT@
|
||||
# LDFLAGS used to link the jdk native libraries (C-code)
|
||||
LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
|
||||
JDKLIB_LIBS:=@JDKLIB_LIBS@
|
||||
GLOBAL_LIBS:=@GLOBAL_LIBS@
|
||||
|
||||
# LDFLAGS used to link the jdk native launchers (C-code)
|
||||
LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
|
||||
@@ -565,11 +565,17 @@ CXXFILT:=@CXXFILT@
|
||||
|
||||
LIPO:=@LIPO@
|
||||
INSTALL_NAME_TOOL:=@INSTALL_NAME_TOOL@
|
||||
METAL := @METAL@
|
||||
METALLIB := @METALLIB@
|
||||
|
||||
# Options to linker to specify a mapfile.
|
||||
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
|
||||
SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@
|
||||
|
||||
# Options for C/CXX compiler to be used if linking is performed
|
||||
# using reorder file
|
||||
C_FLAG_REORDER:=@C_FLAG_REORDER@
|
||||
|
||||
#
|
||||
# Options for generating debug symbols
|
||||
COMPILE_WITH_DEBUG_SYMBOLS := @COMPILE_WITH_DEBUG_SYMBOLS@
|
||||
@@ -612,8 +618,9 @@ STRIPFLAGS:=@STRIPFLAGS@
|
||||
JAVA_FLAGS:=@JAVA_FLAGS@
|
||||
JAVA_FLAGS_BIG:=@JAVA_FLAGS_BIG@
|
||||
JAVA_FLAGS_SMALL:=@JAVA_FLAGS_SMALL@
|
||||
BUILDJDK_JAVA_FLAGS_SMALL:=@BUILDJDK_JAVA_FLAGS_SMALL@
|
||||
JAVA_FLAGS_JAVAC:=@JAVA_FLAGS_JAVAC@
|
||||
JAVA_TOOL_FLAGS_SMALL:=@JAVA_TOOL_FLAGS_SMALL@
|
||||
SJAVAC_SERVER_JAVA_FLAGS:=@SJAVAC_SERVER_JAVA_FLAGS@
|
||||
|
||||
# The *_CMD variables are defined separately to be easily overridden in bootcycle-spec.gmk
|
||||
# for bootcycle-images build. Make sure to keep them in sync. Do not use the *_CMD
|
||||
@@ -625,19 +632,27 @@ JAR_CMD:=@JAR@
|
||||
JLINK_CMD := @JLINK@
|
||||
JMOD_CMD := @JMOD@
|
||||
JARSIGNER_CMD:=@JARSIGNER@
|
||||
JJS_CMD:=@JJS@
|
||||
SJAVAC_SERVER_JAVA_CMD:=@SJAVAC_SERVER_JAVA@
|
||||
# These variables are meant to be used. They are defined with = instead of := to make
|
||||
# it possible to override only the *_CMD variables.
|
||||
JAVA=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
|
||||
JAVA_SMALL=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
|
||||
JAVA_DETACH =@FIXPATH@ @FIXPATH_DETACH_FLAG@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
|
||||
JAVA_JAVAC=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_JAVAC) $(JAVA_FLAGS)
|
||||
JAVAC=@FIXPATH@ $(JAVAC_CMD)
|
||||
JAVADOC=@FIXPATH@ $(JAVADOC_CMD)
|
||||
JAR=@FIXPATH@ $(JAR_CMD)
|
||||
JLINK = @FIXPATH@ $(JLINK_CMD)
|
||||
JLINK = @FIXPATH@ $(JLINK_CMD) $(JAVA_TOOL_FLAGS_SMALL)
|
||||
JMOD = @FIXPATH@ $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
|
||||
JARSIGNER=@FIXPATH@ $(JARSIGNER_CMD)
|
||||
JJS=@FIXPATH@ $(JJS_CMD) $(JAVA_TOOL_FLAGS_SMALL)
|
||||
# A specific java binary with specific options can be used to run
|
||||
# the long running background sjavac servers and other long running tasks.
|
||||
SJAVAC_SERVER_JAVA=@FIXPATH@ @FIXPATH_DETACH_FLAG@ $(SJAVAC_SERVER_JAVA_CMD) \
|
||||
$(SJAVAC_SERVER_JAVA_FLAGS)
|
||||
|
||||
# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
|
||||
# overriding that value by using ?=.
|
||||
JAVAC_FLAGS?=@JAVAC_FLAGS@
|
||||
|
||||
|
||||
BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
|
||||
BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
|
||||
@@ -738,6 +753,7 @@ WSLPATH:=@WSLPATH@
|
||||
LDD:=@LDD@
|
||||
OTOOL:=@OTOOL@
|
||||
READELF:=@READELF@
|
||||
ELFEDIT:=@ELFEDIT@
|
||||
EXPR:=@EXPR@
|
||||
FILE:=@FILE@
|
||||
DOT:=@DOT@
|
||||
@@ -747,6 +763,7 @@ OBJCOPY:=@OBJCOPY@
|
||||
SETFILE:=@SETFILE@
|
||||
XATTR:=@XATTR@
|
||||
JT_HOME:=@JT_HOME@
|
||||
JTREGEXE:=@JTREGEXE@
|
||||
JIB_HOME:=@JIB_HOME@
|
||||
XCODEBUILD=@XCODEBUILD@
|
||||
DTRACE := @DTRACE@
|
||||
@@ -754,6 +771,7 @@ FIXPATH:=@FIXPATH@
|
||||
ULIMIT:=@ULIMIT@
|
||||
|
||||
TAR_TYPE:=@TAR_TYPE@
|
||||
TAR_CREATE_EXTRA_PARAM:=@TAR_CREATE_EXTRA_PARAM@
|
||||
TAR_INCLUDE_PARAM:=@TAR_INCLUDE_PARAM@
|
||||
TAR_SUPPORTS_TRANSFORM:=@TAR_SUPPORTS_TRANSFORM@
|
||||
|
||||
@@ -767,9 +785,9 @@ LIBZ_CFLAGS:=@LIBZ_CFLAGS@
|
||||
LIBZ_LIBS:=@LIBZ_LIBS@
|
||||
LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
|
||||
MSVCR_DLL:=@MSVCR_DLL@
|
||||
VCRUNTIME_1_DLL:=@VCRUNTIME_1_DLL@
|
||||
MSVCP_DLL:=@MSVCP_DLL@
|
||||
UCRT_DLL_DIR:=@UCRT_DLL_DIR@
|
||||
STLPORT_LIB:=@STLPORT_LIB@
|
||||
ENABLE_PANDOC:=@ENABLE_PANDOC@
|
||||
PANDOC_MARKDOWN_FLAG:=@PANDOC_MARKDOWN_FLAG@
|
||||
|
||||
|
||||
@@ -35,10 +35,11 @@
|
||||
m4_include([toolchain_windows.m4])
|
||||
|
||||
# All valid toolchains, regardless of platform (used by help.m4)
|
||||
VALID_TOOLCHAINS_all="gcc clang xlc microsoft"
|
||||
VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
|
||||
|
||||
# These toolchains are valid on different platforms
|
||||
VALID_TOOLCHAINS_linux="gcc clang"
|
||||
VALID_TOOLCHAINS_solaris="solstudio"
|
||||
VALID_TOOLCHAINS_macosx="gcc clang"
|
||||
VALID_TOOLCHAINS_aix="xlc"
|
||||
VALID_TOOLCHAINS_windows="microsoft"
|
||||
@@ -47,12 +48,14 @@ VALID_TOOLCHAINS_windows="microsoft"
|
||||
TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
|
||||
TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
|
||||
TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
|
||||
TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
|
||||
TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
|
||||
|
||||
# Minimum supported versions, empty means unspecified
|
||||
TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
|
||||
TOOLCHAIN_MINIMUM_VERSION_gcc="5.0"
|
||||
TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
|
||||
TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
|
||||
TOOLCHAIN_MINIMUM_VERSION_xlc=""
|
||||
|
||||
# Minimum supported linker versions, empty means unspecified
|
||||
@@ -293,11 +296,13 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE],
|
||||
TOOLCHAIN_CC_BINARY_clang="clang"
|
||||
TOOLCHAIN_CC_BINARY_gcc="gcc"
|
||||
TOOLCHAIN_CC_BINARY_microsoft="cl$EXE_SUFFIX"
|
||||
TOOLCHAIN_CC_BINARY_solstudio="cc"
|
||||
TOOLCHAIN_CC_BINARY_xlc="xlclang"
|
||||
|
||||
TOOLCHAIN_CXX_BINARY_clang="clang++"
|
||||
TOOLCHAIN_CXX_BINARY_gcc="g++"
|
||||
TOOLCHAIN_CXX_BINARY_microsoft="cl$EXE_SUFFIX"
|
||||
TOOLCHAIN_CXX_BINARY_solstudio="CC"
|
||||
TOOLCHAIN_CXX_BINARY_xlc="xlclang++"
|
||||
|
||||
# Use indirect variable referencing
|
||||
@@ -404,7 +409,28 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
|
||||
COMPILER=[$]$1
|
||||
COMPILER_NAME=$2
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
# cc -V output typically looks like
|
||||
# cc: Sun C 5.12 Linux_i386 2011/11/16
|
||||
# or
|
||||
# cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
|
||||
COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
|
||||
# Check that this is likely to be the Solaris Studio cc.
|
||||
$ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
|
||||
if test $? -ne 0; then
|
||||
ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
|
||||
AC_MSG_NOTICE([The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler.])
|
||||
AC_MSG_NOTICE([The result from running with -V was: "$COMPILER_VERSION_OUTPUT"])
|
||||
AC_MSG_NOTICE([The result from running with --version was: "$ALT_VERSION_OUTPUT"])
|
||||
AC_MSG_ERROR([A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir.])
|
||||
fi
|
||||
# Remove usage instructions (if present), and
|
||||
# collapse compiler output into a single line
|
||||
COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
|
||||
$SED -e 's/ *@<:@Uu@:>@sage:.*//'`
|
||||
COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
|
||||
$SED -e "s/^.*@<:@ ,\t@:>@$COMPILER_NAME@<:@ ,\t@:>@\(@<:@1-9@:>@\.@<:@0-9@:>@@<:@0-9@:>@*\).*/\1/"`
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
# xlc -qversion output typically looks like
|
||||
# IBM XL C/C++ for AIX, V11.1 (5724-X13)
|
||||
# Version: 11.01.0000.0015
|
||||
@@ -589,19 +615,26 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_LD_VERSION],
|
||||
LINKER=[$]$1
|
||||
LINKER_NAME="$2"
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
# cc -Wl,-V output typically looks like
|
||||
# ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.2329
|
||||
|
||||
# solstudio cc requires us to have an existing file to pass as argument,
|
||||
# but it need not be a syntactically correct C file, so just use
|
||||
# ourself. :) The intermediate 'cat' is needed to stop ld from leaving
|
||||
# a lingering a.out (!).
|
||||
LINKER_VERSION_STRING=`$LD -Wl,-V $TOPDIR/configure 2>&1 | $CAT | $HEAD -n 1 | $SED -e 's/ld: //'`
|
||||
# Extract version number
|
||||
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
|
||||
$SED -e 's/.* \([0-9][0-9]*\.[0-9][0-9]*\)-\([0-9][0-9]*\.[0-9][0-9]*\)/\1.\2/'` ]
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
LINKER_VERSION_STRING="Unknown"
|
||||
LINKER_VERSION_NUMBER="0.0"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# There is no specific version flag, but all output starts with a version string.
|
||||
# First line typically looks something like:
|
||||
# Microsoft (R) Incremental Linker Version 12.00.31101.0
|
||||
# Reset PATH since it can contain a mix of WSL/linux paths and Windows paths from VS,
|
||||
# which, in combination with WSLENV, will make the WSL layer complain
|
||||
old_path="$PATH"
|
||||
PATH=
|
||||
LINKER_VERSION_STRING=`$LD 2>&1 | $HEAD -n 1 | $TR -d '\r'`
|
||||
PATH="$old_path"
|
||||
# Extract version number
|
||||
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
|
||||
$SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*/\1/'` ]
|
||||
@@ -699,23 +732,13 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
UTIL_FIXUP_EXECUTABLE(LD)
|
||||
# Verify that we indeed succeeded with this trick.
|
||||
AC_MSG_CHECKING([if the found link.exe is actually the Visual Studio linker])
|
||||
|
||||
# Reset PATH since it can contain a mix of WSL/linux paths and Windows paths from VS,
|
||||
# which, in combination with WSLENV, will make the WSL layer complain
|
||||
old_path="$PATH"
|
||||
PATH=
|
||||
|
||||
"$LD" --version > /dev/null
|
||||
|
||||
if test $? -eq 0 ; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([This is the Cygwin link tool. Please check your PATH and rerun configure.])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
|
||||
PATH="$old_path"
|
||||
|
||||
LDCXX="$LD"
|
||||
# jaotc being a windows program expects the linker to be supplied with exe suffix.
|
||||
LD_JAOTC="$LD$EXE_SUFFIX"
|
||||
@@ -746,8 +769,16 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
#
|
||||
# Setup the assembler (AS)
|
||||
#
|
||||
# FIXME: is this correct for microsoft?
|
||||
AS="$CC -c"
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
UTIL_PATH_PROGS(AS, as)
|
||||
UTIL_FIXUP_EXECUTABLE(AS)
|
||||
if test "x$AS" = x; then
|
||||
AC_MSG_ERROR([Solaris assembler (as) is required. Please install via "pkg install pkg:/developer/assembler".])
|
||||
fi
|
||||
else
|
||||
# FIXME: is this correct for microsoft?
|
||||
AS="$CC -c"
|
||||
fi
|
||||
AC_SUBST(AS)
|
||||
|
||||
#
|
||||
@@ -776,6 +807,32 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
|
||||
UTIL_FIXUP_EXECUTABLE(OTOOL)
|
||||
UTIL_REQUIRE_PROGS(INSTALL_NAME_TOOL, install_name_tool)
|
||||
UTIL_FIXUP_EXECUTABLE(INSTALL_NAME_TOOL)
|
||||
|
||||
UTIL_PATH_PROGS(METAL, metal)
|
||||
if test "x$METAL" = x; then
|
||||
AC_MSG_CHECKING([if metal can be run using xcrun])
|
||||
METAL="xcrun -sdk macosx metal"
|
||||
test_metal=`$METAL --version 2>&1`
|
||||
if test $? -ne 0; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([XCode tool 'metal' neither found in path nor with xcrun])
|
||||
else
|
||||
AC_MSG_RESULT([yes, will be using '$METAL'])
|
||||
fi
|
||||
fi
|
||||
|
||||
UTIL_PATH_PROGS(METALLIB, metallib)
|
||||
if test "x$METALLIB" = x; then
|
||||
AC_MSG_CHECKING([if metallib can be run using xcrun])
|
||||
METALLIB="xcrun -sdk macosx metallib"
|
||||
test_metallib=`$METALLIB --version 2>&1`
|
||||
if test $? -ne 0; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([XCode tool 'metallib' neither found in path nor with xcrun])
|
||||
else
|
||||
AC_MSG_RESULT([yes, will be using '$METALLIB'])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
@@ -796,7 +853,15 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
|
||||
AC_CHECK_PROG([MSBUILD], [msbuild$EXE_SUFFIX], [msbuild$EXE_SUFFIX],,,)
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" != xwindows; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
UTIL_PATH_PROGS(STRIP, strip)
|
||||
UTIL_FIXUP_EXECUTABLE(STRIP)
|
||||
UTIL_PATH_PROGS(NM, nm)
|
||||
UTIL_FIXUP_EXECUTABLE(NM)
|
||||
UTIL_PATH_PROGS(GNM, gnm)
|
||||
UTIL_FIXUP_EXECUTABLE(GNM)
|
||||
elif test "x$OPENJDK_TARGET_OS" != xwindows; then
|
||||
# FIXME: we should unify this with the solaris case above.
|
||||
UTIL_CHECK_TOOLS(STRIP, strip)
|
||||
UTIL_FIXUP_EXECUTABLE(STRIP)
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
@@ -811,11 +876,48 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
|
||||
|
||||
# objcopy is used for moving debug symbols to separate files when
|
||||
# full debug symbols are enabled.
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
UTIL_CHECK_TOOLS(OBJCOPY, [gobjcopy objcopy])
|
||||
# Only call fixup if objcopy was found.
|
||||
if test -n "$OBJCOPY"; then
|
||||
UTIL_FIXUP_EXECUTABLE(OBJCOPY)
|
||||
if test "x$OPENJDK_BUILD_OS" = xsolaris; then
|
||||
# objcopy prior to 2.21.1 on solaris is broken and is not usable.
|
||||
# Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
|
||||
# - version number is last blank separate word on first line
|
||||
# - version number formats that have been seen:
|
||||
# - <major>.<minor>
|
||||
# - <major>.<minor>.<micro>
|
||||
OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
|
||||
# The outer [ ] is to prevent m4 from eating the [] in the sed expression.
|
||||
[ OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
|
||||
-e 's/.* //' \
|
||||
-e '/^[01]\./b bad' \
|
||||
-e '/^2\./{' \
|
||||
-e ' s/^2\.//' \
|
||||
-e ' /^[0-9]$/b bad' \
|
||||
-e ' /^[0-9]\./b bad' \
|
||||
-e ' /^1[0-9]$/b bad' \
|
||||
-e ' /^1[0-9]\./b bad' \
|
||||
-e ' /^20\./b bad' \
|
||||
-e ' /^21\.0$/b bad' \
|
||||
-e ' /^21\.0\./b bad' \
|
||||
-e '}' \
|
||||
-e ':good' \
|
||||
-e 's/.*/VALID_VERSION/p' \
|
||||
-e 'q' \
|
||||
-e ':bad' \
|
||||
-e 's/.*/BAD_VERSION/p' \
|
||||
-e 'q'` ]
|
||||
if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
|
||||
OBJCOPY=
|
||||
AC_MSG_WARN([Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated.])
|
||||
AC_MSG_NOTICE([objcopy reports version $OBJCOPY_VERSION])
|
||||
AC_MSG_NOTICE([Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version])
|
||||
AC_MSG_NOTICE([Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version])
|
||||
AC_MSG_NOTICE([Note: Solaris 11 Update 1 contains the correct version])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -827,7 +929,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
|
||||
fi
|
||||
|
||||
case $TOOLCHAIN_TYPE in
|
||||
gcc|clang)
|
||||
gcc|clang|solstudio)
|
||||
UTIL_CHECK_TOOLS(CXXFILT, [c++filt])
|
||||
UTIL_CHECK_NONEMPTY(CXXFILT)
|
||||
UTIL_FIXUP_EXECUTABLE(CXXFILT)
|
||||
@@ -1016,10 +1118,15 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
|
||||
AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home])
|
||||
fi
|
||||
|
||||
JTREGEXE="$JT_HOME/bin/jtreg"
|
||||
if test ! -x "$JTREGEXE"; then
|
||||
AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for jtreg test harness])
|
||||
AC_MSG_RESULT([$JT_HOME])
|
||||
else
|
||||
# Try to locate jtreg using the JT_HOME environment variable
|
||||
# Try to locate jtreg
|
||||
if test "x$JT_HOME" != x; then
|
||||
# JT_HOME set in environment, use it
|
||||
if test ! -d "$JT_HOME"; then
|
||||
@@ -1029,7 +1136,11 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
|
||||
if test ! -e "$JT_HOME/lib/jtreg.jar"; then
|
||||
AC_MSG_WARN([Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME])
|
||||
JT_HOME=
|
||||
elif test ! -x "$JT_HOME/bin/jtreg"; then
|
||||
AC_MSG_WARN([Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME])
|
||||
JT_HOME=
|
||||
else
|
||||
JTREGEXE="$JT_HOME/bin/jtreg"
|
||||
AC_MSG_NOTICE([Located jtreg using JT_HOME from environment])
|
||||
fi
|
||||
fi
|
||||
@@ -1045,6 +1156,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
|
||||
if test ! -e "$JT_HOME/lib/jtreg.jar"; then
|
||||
AC_MSG_WARN([Ignoring jtreg from path since a valid jtreg home cannot be found])
|
||||
JT_HOME=
|
||||
JTREGEXE=
|
||||
else
|
||||
AC_MSG_NOTICE([Located jtreg using jtreg executable in path])
|
||||
fi
|
||||
@@ -1063,8 +1175,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
|
||||
fi
|
||||
fi
|
||||
|
||||
UTIL_FIXUP_EXECUTABLE(JTREGEXE)
|
||||
UTIL_FIXUP_PATH(JT_HOME)
|
||||
AC_SUBST(JT_HOME)
|
||||
AC_SUBST(JTREGEXE)
|
||||
])
|
||||
|
||||
# Setup the JIB dependency resolver
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2019, 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
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
################################################################################
|
||||
# The order of these defines the priority by which we try to find them.
|
||||
VALID_VS_VERSIONS="2019 2017 2013 2015 2012 2010"
|
||||
VALID_VS_VERSIONS="2017 2019 2013 2015 2012 2010"
|
||||
|
||||
VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
|
||||
VS_VERSION_INTERNAL_2010=100
|
||||
@@ -90,9 +90,8 @@ VS_SUPPORTED_2017=true
|
||||
VS_TOOLSET_SUPPORTED_2017=true
|
||||
|
||||
VS_DESCRIPTION_2019="Microsoft Visual Studio 2019"
|
||||
VS_VERSION_INTERNAL_2019=142
|
||||
VS_VERSION_INTERNAL_2019=141
|
||||
VS_MSVCR_2019=vcruntime140.dll
|
||||
VS_VCRUNTIME_1_2019=vcruntime140_1.dll
|
||||
VS_MSVCP_2019=msvcp140.dll
|
||||
VS_ENVVAR_2019="VS160COMNTOOLS"
|
||||
VS_USE_UCRT_2019="true"
|
||||
@@ -101,8 +100,8 @@ VS_EDITIONS_2019="BuildTools Community Professional Enterprise"
|
||||
VS_SDK_INSTALLDIR_2019=
|
||||
VS_VS_PLATFORM_NAME_2019="v142"
|
||||
VS_SDK_PLATFORM_NAME_2019=
|
||||
VS_SUPPORTED_2019=true
|
||||
VS_TOOLSET_SUPPORTED_2019=true
|
||||
VS_SUPPORTED_2019=false
|
||||
VS_TOOLSET_SUPPORTED_2019=false
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -300,7 +299,6 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
|
||||
fi
|
||||
eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
|
||||
eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
|
||||
eval VCRUNTIME_1_NAME="\${VS_VCRUNTIME_1_${VS_VERSION}}"
|
||||
eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
|
||||
eval USE_UCRT="\${VS_USE_UCRT_${VS_VERSION}}"
|
||||
eval VS_SUPPORTED="\${VS_SUPPORTED_${VS_VERSION}}"
|
||||
@@ -367,7 +365,6 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
|
||||
eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
|
||||
eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
|
||||
eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
|
||||
eval VCRUNTIME_1_NAME="\${VS_VCRUNTIME_1_${VS_VERSION}}"
|
||||
eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
|
||||
eval USE_UCRT="\${VS_USE_UCRT_${VS_VERSION}}"
|
||||
eval VS_SUPPORTED="\${VS_SUPPORTED_${VS_VERSION}}"
|
||||
@@ -485,9 +482,10 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
fi
|
||||
|
||||
# Now execute the newly created bat file.
|
||||
# The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
|
||||
# Change directory so we don't need to mess with Windows paths in redirects.
|
||||
cd $VS_ENV_TMP_DIR
|
||||
$CMD /c extract-vs-env.bat > extract-vs-env.log 2>&1
|
||||
$CMD /c extract-vs-env.bat | $CAT
|
||||
cd $CONFIGURE_START_DIR
|
||||
|
||||
if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
|
||||
@@ -804,31 +802,6 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
|
||||
AC_SUBST(MSVCP_DLL)
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(vcruntime-1-dll, [AS_HELP_STRING([--with-vcruntime-1-dll],
|
||||
[path to microsoft C++ runtime dll (vcruntime*_1.dll) (Windows only) @<:@probed@:>@])])
|
||||
|
||||
if test "x$VCRUNTIME_1_NAME" != "x"; then
|
||||
if test "x$with_vcruntime_1_dll" != x; then
|
||||
# If given explicitly by user, do not probe. If not present, fail directly.
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($VCRUNTIME_1_NAME, [$with_vcruntime_1_dll],
|
||||
[--with-vcruntime-1-dll])
|
||||
if test "x$MSVC_DLL" = x; then
|
||||
AC_MSG_ERROR([Could not find a proper $VCRUNTIME_1_NAME as specified by --with-vcruntime-1-dll])
|
||||
fi
|
||||
VCRUNTIME_1_DLL="$MSVC_DLL"
|
||||
elif test "x$DEVKIT_VCRUNTIME_1_DLL" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($VCRUNTIME_1_NAME, [$DEVKIT_VCRUNTIME_1_DLL], [devkit])
|
||||
if test "x$MSVC_DLL" = x; then
|
||||
AC_MSG_ERROR([Could not find a proper $VCRUNTIME_1_NAME as specified by devkit])
|
||||
fi
|
||||
VCRUNTIME_1_DLL="$MSVC_DLL"
|
||||
else
|
||||
TOOLCHAIN_SETUP_MSVC_DLL([${VCRUNTIME_1_NAME}])
|
||||
VCRUNTIME_1_DLL="$MSVC_DLL"
|
||||
fi
|
||||
AC_SUBST(VCRUNTIME_1_DLL)
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(ucrt-dll-dir, [AS_HELP_STRING([--with-ucrt-dll-dir],
|
||||
[path to Microsoft Windows Kit UCRT DLL dir (Windows only) @<:@probed@:>@])])
|
||||
|
||||
|
||||
@@ -227,29 +227,6 @@ AC_DEFUN([UTIL_GET_MATCHING_VALUES],
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Converts an ISO-8601 date/time string to a unix epoch timestamp. If no
|
||||
# suitable conversion method was found, an empty string is returned.
|
||||
#
|
||||
# Sets the specified variable to the resulting list.
|
||||
#
|
||||
# $1: result variable name
|
||||
# $2: input date/time string
|
||||
AC_DEFUN([UTIL_GET_EPOCH_TIMESTAMP],
|
||||
[
|
||||
timestamp=$($DATE --utc --date=$2 +"%s" 2> /dev/null)
|
||||
if test "x$timestamp" = x; then
|
||||
# GNU date format did not work, try BSD date options
|
||||
timestamp=$($DATE -j -f "%F %T" "$2" "+%s" 2> /dev/null)
|
||||
if test "x$timestamp" = x; then
|
||||
# Perhaps the time was missing
|
||||
timestamp=$($DATE -j -f "%F %T" "$2 00:00:00" "+%s" 2> /dev/null)
|
||||
# If this did not work, we give up and return the empty string
|
||||
fi
|
||||
fi
|
||||
$1=$timestamp
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Sort a space-separated list, and remove duplicates.
|
||||
#
|
||||
@@ -343,14 +320,12 @@ AC_DEFUN([UTIL_ALIASED_ARG_ENABLE],
|
||||
# option should be available. Must set AVAILABLE to 'false' if not.
|
||||
# IF_GIVEN: An optional code block to execute if the option was given on the
|
||||
# command line (regardless of the value).
|
||||
# IF_NOT_GIVEN: An optional code block to execute if the option was not given
|
||||
# on the command line (regardless of the value).
|
||||
# IF_ENABLED: An optional code block to execute if the option is turned on.
|
||||
# IF_DISABLED: An optional code block to execute if the option is turned off.
|
||||
#
|
||||
UTIL_DEFUN_NAMED([UTIL_ARG_ENABLE],
|
||||
[*NAME RESULT DEFAULT AVAILABLE DESC DEFAULT_DESC CHECKING_MSG
|
||||
CHECK_AVAILABLE IF_GIVEN IF_NOT_GIVEN IF_ENABLED IF_DISABLED], [$@],
|
||||
CHECK_AVAILABLE IF_GIVEN IF_ENABLED IF_DISABLED], [$@],
|
||||
[
|
||||
##########################
|
||||
# Part 1: Set up m4 macros
|
||||
@@ -381,7 +356,6 @@ UTIL_DEFUN_NAMED([UTIL_ARG_ENABLE],
|
||||
# tripping up bash.
|
||||
m4_define([ARG_CHECK_AVAILABLE], m4_if(ARG_CHECK_AVAILABLE, , :, ARG_CHECK_AVAILABLE))
|
||||
m4_define([ARG_IF_GIVEN], m4_if(ARG_IF_GIVEN, , :, ARG_IF_GIVEN))
|
||||
m4_define([ARG_IF_NOT_GIVEN], m4_if(ARG_IF_NOT_GIVEN, , :, ARG_IF_NOT_GIVEN))
|
||||
m4_define([ARG_IF_ENABLED], m4_if(ARG_IF_ENABLED, , :, ARG_IF_ENABLED))
|
||||
m4_define([ARG_IF_DISABLED], m4_if(ARG_IF_DISABLED, , :, ARG_IF_DISABLED))
|
||||
|
||||
@@ -451,8 +425,6 @@ UTIL_DEFUN_NAMED([UTIL_ARG_ENABLE],
|
||||
# Execute result payloads, if present
|
||||
if test x$ARG_GIVEN = xtrue; then
|
||||
ARG_IF_GIVEN
|
||||
else
|
||||
ARG_IF_NOT_GIVEN
|
||||
fi
|
||||
|
||||
if test x$ARG_RESULT = xtrue; then
|
||||
@@ -534,7 +506,7 @@ AC_DEFUN([UTIL_SETUP_TOOL],
|
||||
# Otherwise we believe it is a complete path. Use it as it is.
|
||||
AC_MSG_NOTICE([Will use user supplied tool "$tool_command"])
|
||||
AC_MSG_CHECKING([for $tool_command])
|
||||
if test ! -x "$tool_command" && test ! -x "$tool_command.exe"; then
|
||||
if test ! -x "$tool_command"; then
|
||||
AC_MSG_RESULT([not found])
|
||||
AC_MSG_ERROR([User supplied tool $1="$tool_command" does not exist or is not executable])
|
||||
fi
|
||||
@@ -601,7 +573,7 @@ AC_DEFUN([UTIL_REQUIRE_BUILTIN_PROGS],
|
||||
UTIL_SETUP_TOOL($1, [AC_PATH_PROGS($1, $2, , $3)])
|
||||
if test "x[$]$1" = x; then
|
||||
AC_MSG_NOTICE([Required tool $2 not found in PATH, checking built-in])
|
||||
if command -v $2 > /dev/null 2>&1; then
|
||||
if help $2 > /dev/null 2>&1; then
|
||||
AC_MSG_NOTICE([Found $2 as shell built-in. Using it])
|
||||
$1="$2"
|
||||
else
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2016, 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
|
||||
@@ -127,15 +127,10 @@ AC_DEFUN([UTIL_MAKE_WINDOWS_SPACE_SAFE_WSL],
|
||||
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([TOPDIR_windows])
|
||||
# First convert to Windows path to make input valid for cmd
|
||||
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([input_path])
|
||||
# Reset PATH since it can contain a mix of WSL/linux paths and Windows paths from VS,
|
||||
# which, in combination with WSLENV, will make the WSL layer complain
|
||||
old_path="$PATH"
|
||||
PATH=
|
||||
new_path=`$CMD /c $TOPDIR_windows/make/scripts/windowsShortName.bat "$input_path" \
|
||||
| $SED -e 's|\r||g' \
|
||||
| $TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
# Rewrite back to unix style
|
||||
PATH="$old_path"
|
||||
UTIL_REWRITE_AS_UNIX_PATH([new_path])
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -36,7 +36,7 @@ DEFAULT_VERSION_EXTRA3=0
|
||||
DEFAULT_VERSION_DATE=2020-09-15
|
||||
DEFAULT_VERSION_CLASSFILE_MAJOR=59 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
|
||||
DEFAULT_VERSION_CLASSFILE_MINOR=0
|
||||
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="14 15"
|
||||
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="13 14 15"
|
||||
DEFAULT_JDK_SOURCE_TARGET_VERSION=15
|
||||
DEFAULT_PROMOTED_VERSION_PRE=ea
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ $(eval $(call IncludeCustomExtension, common/FindTests.gmk))
|
||||
TEST_BASEDIRS += $(TOPDIR)/test $(TOPDIR)
|
||||
|
||||
# JTREG_TESTROOTS might have been set by a custom extension
|
||||
JTREG_TESTROOTS += $(addprefix $(TOPDIR)/test/, hotspot/jtreg jdk langtools jaxp)
|
||||
JTREG_TESTROOTS += $(addprefix $(TOPDIR)/test/, hotspot/jtreg jdk langtools nashorn jaxp)
|
||||
|
||||
# Extract the names of the Jtreg group files from the TEST.ROOT files. The
|
||||
# TEST.ROOT files being properties files can be interpreted as makefiles so
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# When you read this source. Remember that $(sort ...) has the side effect
|
||||
# of removing duplicates. It is actually this side effect that is
|
||||
# desired whenever sort is used below!
|
||||
|
||||
ifndef _JAVA_COMPILATION_GMK
|
||||
_JAVA_COMPILATION_GMK := 1
|
||||
|
||||
@@ -35,22 +39,30 @@ endif
|
||||
include JarArchive.gmk
|
||||
include ZipArchive.gmk
|
||||
|
||||
###
|
||||
### Definitions for common release targets
|
||||
###
|
||||
|
||||
# Create classes that can run on the bootjdk
|
||||
TARGET_RELEASE_BOOTJDK := $(BOOT_JDK_SOURCETARGET)
|
||||
|
||||
# Create classes that can be used in (or be a part of) the new jdk we're building
|
||||
TARGET_RELEASE_NEWJDK := -source $(JDK_SOURCE_TARGET_VERSION) -target $(JDK_SOURCE_TARGET_VERSION)
|
||||
|
||||
# Create classes that can be used in JDK 8, for legacy support
|
||||
TARGET_RELEASE_JDK8 := --release 8
|
||||
|
||||
# Create classes for the new jdk, relying only on the modules of the new jdk
|
||||
TARGET_RELEASE_NEWJDK_UPGRADED := $(TARGET_RELEASE_NEWJDK) \
|
||||
--upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none
|
||||
# Setup make rules for defining a Java compiler, which is needed to compile
|
||||
# Java code. This rule generates no output.
|
||||
#
|
||||
# Parameter 1 is the name of the compiler definition. This name needs to be
|
||||
# passed to SetupJavaCompilation. This name is used as variable prefix.
|
||||
#
|
||||
# Remaining parameters are named arguments. These include:
|
||||
# JVM:=The jvm used to run the javac command
|
||||
# JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out
|
||||
# FLAGS:=Flags to be supplied to javac
|
||||
# SERVER_DIR:=Use a javac server (-XDserver) and store the server related files here
|
||||
# SERVER_JVM:=Use this JVM for the server. Defaults to the JVM above.
|
||||
# DISABLE_SJAVAC:=Set to true if this setup does not support sjavac
|
||||
SetupJavaCompiler = $(NamedParamsMacroTemplate)
|
||||
define SetupJavaCompilerBody
|
||||
# The port file contains the tcp/ip on which the server listens
|
||||
# and the cookie necessary to talk to the server.
|
||||
$1_SJAVAC_PORTFILE:=$$($1_SERVER_DIR)/server.port
|
||||
# You can use a different JVM to run the background javac server.
|
||||
ifeq ($$($1_SERVER_JVM),)
|
||||
# It defaults to the same JVM that is used to start the javac command.
|
||||
$1_SERVER_JVM:=$$($1_JVM)
|
||||
endif
|
||||
endef
|
||||
|
||||
define add_file_to_copy
|
||||
# param 1 = BUILD_MYPACKAGE
|
||||
@@ -64,7 +76,7 @@ define add_file_to_copy
|
||||
$1_COPY_$$($2_TARGET) := 1
|
||||
# Now we can setup the dependency that will trigger the copying.
|
||||
$$($1_BIN)$$($1_MODULE_SUBDIR)$$($2_TARGET) : $2
|
||||
$$(call LogInfo, Copying $$(patsubst $$(OUTPUTDIR)/%,%, $$@))
|
||||
$$(call LogInfo, Copying $$(patsubst $(OUTPUTDIR)/%,%, $$@))
|
||||
$$(install-file)
|
||||
$(CHMOD) -f ug+w $$@
|
||||
|
||||
@@ -74,7 +86,10 @@ define add_file_to_copy
|
||||
endef
|
||||
|
||||
# This macro is used only for properties files that are to be
|
||||
# copied over to the classes directory in cleaned form.
|
||||
# copied over to the classes directory in cleaned form:
|
||||
# Previously this was inconsistently done in different repositories.
|
||||
# This is the new clean standard. Though it is to be superseded by
|
||||
# a standard annotation processor from with sjavac.
|
||||
#
|
||||
# An empty echo ensures that the input to sed always ends with a newline.
|
||||
# Certain implementations (e.g. Solaris) will skip the last line without
|
||||
@@ -105,12 +120,12 @@ define add_file_to_clean
|
||||
ifneq ($$($1_CLEAN_$$($2_TARGET)), 1)
|
||||
$1_CLEAN_$$($2_TARGET) := 1
|
||||
$$($1_BIN)$$($1_MODULE_SUBDIR)$$($2_TARGET) : $2
|
||||
$$(call LogInfo, Cleaning $$(patsubst $$(OUTPUTDIR)/%,%, $$@))
|
||||
$$(call LogInfo, Cleaning $$(patsubst $(OUTPUTDIR)/%,%, $$@))
|
||||
$$(call MakeTargetDir)
|
||||
( $(CAT) $$< && $(ECHO) "" ) \
|
||||
| $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' \
|
||||
-e 's/\([^\\]\)!/\1\\!/g' -e 's/^[ ]*#.*/#/g' \
|
||||
| $(SED) -f "$$(TOPDIR)/make/common/support/unicode2x.sed" \
|
||||
| $(SED) -f "$(TOPDIR)/make/common/support/unicode2x.sed" \
|
||||
| $(SED) -e '/^#/d' -e '/^$$$$/d' \
|
||||
-e :a -e '/\\$$$$/N; s/\\\n//; ta' \
|
||||
-e 's/^[ ]*//;s/[ ]*$$$$//' \
|
||||
@@ -136,12 +151,9 @@ endef
|
||||
# The target for public API digest is returned in $1_API_TARGET.
|
||||
#
|
||||
# Remaining parameters are named arguments. These include:
|
||||
# SMALL_JAVA:=set to false to run javac as a "big" java app
|
||||
# COMPILER:=bootjdk or interim, the latter is default
|
||||
# TARGET_RELEASE:=javac flags to set the targeted jdk release (-source/-target or --release)
|
||||
# Defaults to $(TARGET_RELEASE_NEWJDK).
|
||||
# JAVAC_FLAGS:=javac flags to append to the default ones.
|
||||
# JAVA_FLAGS:=flags to be appended to the java launching the compiler
|
||||
# SETUP:=must point to a previously setup java compiler, for example: SETUP:=BOOTJAVAC
|
||||
# JVM:=path to ..bin/java
|
||||
# ADD_JAVAC_FLAGS:=javac flags to append to the default ones.
|
||||
# DISABLED_WARNINGS:=list of Xlint warnings that should be disabled
|
||||
# SRC:=one or more directories to search for sources. The order of the source roots
|
||||
# is significant. The first found file of a certain name has priority.
|
||||
@@ -162,12 +174,14 @@ endef
|
||||
# specify files that need to be generated by other rules first.
|
||||
# HEADERS:=path to directory where all generated c-headers are written.
|
||||
# DEPENDS:=Extra dependecy
|
||||
# DISABLE_SJAVAC:=Explicitly disable the use of sjavac for this compilation unit.
|
||||
# KEEP_DUPS:=Do not remove duplicate file names from different source roots.
|
||||
# FAIL_NO_SRC:=Set to false to not fail the build if no source files are found,
|
||||
# default is true.
|
||||
# DEBUG_SYMBOLS:=Set to false to disable generation of debug symbols.
|
||||
# CREATE_API_DIGEST:=Set to true to use a javac plugin to generate a public API
|
||||
# hash which can be used for down stream dependencies to only rebuild
|
||||
# when the API changes.
|
||||
# when the API changes. Implicitly used in sjavac.
|
||||
# KEEP_ALL_TRANSLATIONS:=Set to true to skip translation filtering
|
||||
SetupJavaCompilation = $(NamedParamsMacroTemplate)
|
||||
define SetupJavaCompilationBody
|
||||
@@ -177,76 +191,14 @@ define SetupJavaCompilationBody
|
||||
$$(error Must specify BIN (in $1))
|
||||
endif
|
||||
|
||||
ifeq ($$($1_SMALL_JAVA), )
|
||||
# If unspecified, default to true
|
||||
$1_SMALL_JAVA := true
|
||||
# Extract the info from the java compiler setup.
|
||||
$1_JVM := $$($$($1_SETUP)_JVM)
|
||||
$1_JAVAC := $$($$($1_SETUP)_JAVAC)
|
||||
$1_FLAGS :=
|
||||
ifneq ($$($1_DEBUG_SYMBOLS), false)
|
||||
$1_FLAGS := -g
|
||||
endif
|
||||
|
||||
ifeq ($$($1_COMPILER), )
|
||||
# If unspecified, default to interim compiler
|
||||
$1_COMPILER := interim
|
||||
endif
|
||||
|
||||
ifeq ($$($1_COMPILER), bootjdk)
|
||||
# Javac server is not available when using the bootjdk compiler.
|
||||
$1_JAVAC_CMD := $$(JAVAC)
|
||||
|
||||
ifeq ($$($1_SMALL_JAVA), true)
|
||||
$1_FLAGS += $$(addprefix -J, $$(JAVA_FLAGS_SMALL))
|
||||
endif
|
||||
ifeq ($$($1_JAVA_FLAGS), true)
|
||||
$1_FLAGS += $$(addprefix -J, $$($1_JAVA_FLAGS))
|
||||
endif
|
||||
|
||||
ifeq ($$($1_TARGET_RELEASE), )
|
||||
# If unspecified, default to the new jdk we're building
|
||||
$1_TARGET_RELEASE := $$(TARGET_RELEASE_BOOTJDK)
|
||||
endif
|
||||
else ifeq ($$($1_COMPILER), interim)
|
||||
# Use java server if it is enabled, and the user does not want a specialized
|
||||
# class path.
|
||||
ifeq ($$(ENABLE_JAVAC_SERVER)+$$($1_CLASSPATH), true+)
|
||||
$1_JAVAC := $$(INTERIM_LANGTOOLS_ARGS) -m jdk.compiler.interim/com.sun.tools.sjavac.Main
|
||||
|
||||
# How to launch the server. This must use JAVA_DETACH, which is the "big" java
|
||||
# with an ability to detach from fixpath (on Windows)
|
||||
# This will be executed by the client, if needed.
|
||||
$1_JAVAC_SERVER_CMD := $$(JAVA_DETACH) $$($1_JAVA_FLAGS) $$($1_JAVAC)
|
||||
$1_ESCAPED_CMD := $$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_JAVAC_SERVER_CMD))))
|
||||
|
||||
# The port file contains the tcp/ip on which the server listens
|
||||
# and the cookie necessary to talk to the server.
|
||||
$1_JAVA_SERVER_FLAGS := --server:portfile=$$(JAVAC_SERVER_DIR)/server.port,sjavac=$$($1_ESCAPED_CMD)
|
||||
|
||||
# Always use small to launch client
|
||||
$1_JAVAC_CMD := $$(JAVA_SMALL) $$($1_JAVA_FLAGS) $$($1_JAVAC) $$($1_JAVA_SERVER_FLAGS)
|
||||
else
|
||||
# No javac server
|
||||
$1_JAVAC := $$(INTERIM_LANGTOOLS_ARGS) -m jdk.compiler.interim/com.sun.tools.javac.Main
|
||||
|
||||
ifeq ($$($1_SMALL_JAVA), true)
|
||||
$1_JAVAC_CMD := $$(JAVA_SMALL) $$($1_JAVA_FLAGS) $$($1_JAVAC)
|
||||
else
|
||||
$1_JAVAC_CMD := $$(JAVA) $$($1_JAVA_FLAGS) $$($1_JAVAC)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($$($1_TARGET_RELEASE), )
|
||||
# If unspecified, default to the new jdk we're building
|
||||
$1_TARGET_RELEASE := $$(TARGET_RELEASE_NEWJDK)
|
||||
endif
|
||||
else
|
||||
$$(error Invalid value for COMPILER in SetupJavaCompilation for $1: '$$($1_COMPILER)')
|
||||
endif
|
||||
|
||||
# Allow overriding on the command line
|
||||
JAVA_WARNINGS_ARE_ERRORS ?= -Werror
|
||||
|
||||
# Tell javac to do exactly as told and no more
|
||||
PARANOIA_FLAGS := -implicit:none -Xprefer:source -XDignore.symbol.file=true -encoding ascii
|
||||
|
||||
$1_FLAGS += -g -Xlint:all --doclint-format html5 $$($1_TARGET_RELEASE) $$(PARANOIA_FLAGS) $$(JAVA_WARNINGS_ARE_ERRORS)
|
||||
$1_FLAGS += $$($1_JAVAC_FLAGS)
|
||||
$1_FLAGS += $$($$($1_SETUP)_FLAGS) $$($1_ADD_JAVAC_FLAGS) $(JAVAC_FLAGS)
|
||||
|
||||
ifneq ($$($1_DISABLED_WARNINGS), )
|
||||
$1_FLAGS += -Xlint:$$(call CommaList, $$(addprefix -, $$($1_DISABLED_WARNINGS)))
|
||||
@@ -256,6 +208,13 @@ define SetupJavaCompilationBody
|
||||
$1_FLAGS += -cp $$(call PathList, $$($1_CLASSPATH))
|
||||
endif
|
||||
|
||||
ifeq ($$($1_JAVAC),)
|
||||
$$(error The Java compilation $1 refers to a non-existant java compiler setup $$($1_SETUP))
|
||||
endif
|
||||
$1_SJAVAC_PORTFILE := $$($$($1_SETUP)_SJAVAC_PORTFILE)
|
||||
$1_SERVER_JVM := $$($$($1_SETUP)_SERVER_JVM)
|
||||
$1_DISABLE_SJAVAC := $$($$($1_SETUP)_DISABLE_SJAVAC)
|
||||
|
||||
ifneq ($$($1_MODULE), )
|
||||
$1_MODULE_SUBDIR := /$$($1_MODULE)
|
||||
endif
|
||||
@@ -305,10 +264,13 @@ define SetupJavaCompilationBody
|
||||
# Remove duplicate source files by keeping the first found of each duplicate.
|
||||
# This allows for automatic overrides with custom or platform specific versions
|
||||
# source files.
|
||||
#
|
||||
# For the smart javac wrapper case, add each removed file to an extra exclude
|
||||
# file list to prevent sjavac from finding duplicate sources.
|
||||
$1_SRCS := $$(strip $$(foreach s, $$($1_SRCS), \
|
||||
$$(eval relative_src := $$(call remove-prefixes, $$($1_SRC), $$(s))) \
|
||||
$$(if $$($1_$$(relative_src)), \
|
||||
, \
|
||||
$$(eval $1_SJAVAC_EXCLUDE_FILES += $$(s)), \
|
||||
$$(eval $1_$$(relative_src) := 1) $$(s))))
|
||||
endif
|
||||
|
||||
@@ -381,17 +343,92 @@ define SetupJavaCompilationBody
|
||||
# and remove .java at the end.
|
||||
$1_REWRITE_INTO_CLASSES:=$$(foreach i,$$($1_SRC),-e 's|$$i/||g') -e 's|/|.|g' -e 's|.java$$$$||g'
|
||||
|
||||
$1_COMPILE_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch
|
||||
$1_FILELIST := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch.filelist
|
||||
# Create SJAVAC variable from JAVAC variable. Expects $1_JAVAC to be
|
||||
# "bootclasspathprepend -cp .../javac.jar com.sun.tools.javac.Main"
|
||||
# and javac is simply replaced with sjavac.
|
||||
$1_SJAVAC:=$$(subst com.sun.tools.javac.Main,com.sun.tools.sjavac.Main,$$($1_JAVAC))
|
||||
|
||||
# Set the $1_REMOTE to spawn a background javac server.
|
||||
$1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst \
|
||||
$$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))
|
||||
|
||||
$1_COMPILE_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch
|
||||
$1_API_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_pubapi
|
||||
|
||||
# Put headers in a temp dir to filter out those that actually
|
||||
# changed before copying them to the real header dir.
|
||||
ifneq (,$$($1_HEADERS))
|
||||
$1_HEADERS_ARG := -h $$($1_HEADERS).$1.tmp
|
||||
ifeq ($$($1_DISABLE_SJAVAC)x$$(ENABLE_SJAVAC),xyes)
|
||||
# Using sjavac to compile.
|
||||
|
||||
$$($1_HEADERS)/_the.$1_headers: $$($1_COMPILE_TARGET)
|
||||
# Create the sjavac wrapper command line. Sjavac doesn't handle patterns that
|
||||
# match the absolute path, only the part inside each src dir. Instead -i and
|
||||
# -x flags apply only to the next -src arg on the command line.
|
||||
$1_EXCLUDE_FILES_ABS := $$(filter /%, $$($1_EXCLUDE_FILES)) $$($1_SJAVAC_EXCLUDE_FILES)
|
||||
$1_EXCLUDE_FILES_REL := $$(filter-out /%, $$($1_EXCLUDE_FILES))
|
||||
$1_SJAVAC_ARGS_STRING := $$(foreach s, $$(patsubst %/, %, $$($1_SRC)), \
|
||||
$$(addprefix -x ,$$(addsuffix /**,$$($1_EXCLUDES))) \
|
||||
$$(addprefix -i ,$$(addsuffix /**,$$($1_INCLUDES))) \
|
||||
$$(addprefix -x **,$$(strip $$($1_EXCLUDE_FILES_REL))) \
|
||||
$$(addprefix -i **,$$(strip $$($1_INCLUDE_FILES))) \
|
||||
$$(addprefix -x , $$(strip $$(patsubst $$(s)/%, %, $$(filter $$(s)/%, $$($1_EXCLUDE_FILES_ABS))))) \
|
||||
-src $$(s))
|
||||
|
||||
ifneq ($$(word 20, $$($1_SJAVAC_ARGS_STRING)), )
|
||||
$1_SJAVAC_ARGS_FILE := $$($1_BIN)/_the.$1_args
|
||||
$1_SJAVAC_ARGS := @$$($1_SJAVAC_ARGS_FILE)
|
||||
else
|
||||
$1_SJAVAC_ARGS := $$($1_SJAVAC_ARGS_STRING)
|
||||
endif
|
||||
|
||||
|
||||
ifneq (,$$($1_HEADERS))
|
||||
$1_HEADERS_ARG := -h $$($1_HEADERS)
|
||||
endif
|
||||
|
||||
$1_VARDEPS := $$($1_JVM) $$($1_SJAVAC) $$($1_SJAVAC_ARGS_STRING) $$($1_FLAGS) \
|
||||
$$($1_HEADERS_ARG) $$($1_BIN) $$($1_EXCLUDES) $$($1_INCLUDES) \
|
||||
$$($1_EXCLUDE_FILES) $$($1_INCLUDE_FILES)
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||
$$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1.vardeps)
|
||||
|
||||
$$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
|
||||
$$(call MakeDir, $$(@D) $$(dir $$($1_SJAVAC_PORTFILE)))
|
||||
$$(eval $$(call ListPathsSafely,$1_SRCS, $$@.tmp))
|
||||
ifneq ($$($1_SJAVAC_ARGS_FILE), )
|
||||
$$(eval $$(call ListPathsSafely,$1_SJAVAC_ARGS_STRING, $$($1_SJAVAC_ARGS_FILE)))
|
||||
endif
|
||||
$$(call LogWarn, Compiling $1)
|
||||
$$(call ExecuteWithLog, $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$$($1_SAFE_NAME)_batch, \
|
||||
$$($1_JVM) $$($1_SJAVAC) \
|
||||
$$($1_REMOTE) \
|
||||
-j 1 \
|
||||
--permit-unidentified-artifacts \
|
||||
--permit-sources-without-package \
|
||||
--compare-found-sources $$@.tmp \
|
||||
--log=$(LOG_LEVEL) \
|
||||
--state-dir=$$($1_BIN)$$($1_MODULE_SUBDIR) \
|
||||
$$($1_SJAVAC_ARGS) \
|
||||
$$($1_FLAGS) \
|
||||
$$($1_HEADERS_ARG) \
|
||||
-d $$($1_BIN)) && \
|
||||
$(MV) $$@.tmp $$@
|
||||
# Create a pubapi file that only changes when the pubapi changes. Dependent
|
||||
# compilations can use this file to only get recompiled when pubapi has changed.
|
||||
# Grep returns 1 if no matching lines are found. Do not fail for this.
|
||||
$(GREP) -e "^I" $$($1_BIN)$$($1_MODULE_SUBDIR)/javac_state \
|
||||
> $$($1_API_TARGET).tmp || test "$$$$?" = "1"
|
||||
if [ ! -f $$($1_API_TARGET) ] \
|
||||
|| [ "`$(DIFF) $$($1_API_TARGET) $$($1_API_TARGET).tmp`" != "" ]; then \
|
||||
$(MV) $$($1_API_TARGET).tmp $$($1_API_TARGET); \
|
||||
fi
|
||||
|
||||
else
|
||||
# Using plain javac to batch compile everything.
|
||||
|
||||
# When building in batch, put headers in a temp dir to filter out those that actually
|
||||
# changed before copying them to the real header dir.
|
||||
ifneq (,$$($1_HEADERS))
|
||||
$1_HEADERS_ARG := -h $$($1_HEADERS).$1.tmp
|
||||
|
||||
$$($1_HEADERS)/_the.$1_headers: $$($1_COMPILE_TARGET)
|
||||
$$(call MakeTargetDir)
|
||||
if [ -d "$$($1_HEADERS).$1.tmp" ]; then \
|
||||
for f in `$(CD) $$($1_HEADERS).$1.tmp && $(FIND) . -type f`; do \
|
||||
@@ -405,41 +442,43 @@ define SetupJavaCompilationBody
|
||||
$(RM) -r $$($1_HEADERS).$1.tmp
|
||||
$(TOUCH) $$@
|
||||
|
||||
$1_HEADER_TARGETS := $$($1_HEADERS)/_the.$1_headers
|
||||
endif
|
||||
$1_HEADER_TARGETS := $$($1_HEADERS)/_the.$1_headers
|
||||
endif
|
||||
|
||||
$1_VARDEPS := $$($1_JAVAC_CMD) $$($1_FLAGS) $$($1_BIN) \
|
||||
$$($1_HEADERS_ARG) $$($1_EXCLUDES) $$($1_INCLUDES) \
|
||||
$$($1_EXCLUDE_FILES) $$($1_INCLUDE_FILES)
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||
$$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1.vardeps)
|
||||
$1_VARDEPS := $$($1_JVM) $$($1_JAVAC) $$($1_FLAGS) $$($1_BIN) \
|
||||
$$($1_HEADERS_ARG) $$($1_EXCLUDES) $$($1_INCLUDES) \
|
||||
$$($1_EXCLUDE_FILES) $$($1_INCLUDE_FILES)
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||
$$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1.vardeps)
|
||||
|
||||
ifeq ($$($1_CREATE_API_DIGEST), true)
|
||||
$1_API_DIGEST_FLAGS := \
|
||||
-classpath $$(BUILDTOOLS_OUTPUTDIR)/depend \
|
||||
-Xplugin:"depend $$($1_API_TARGET)" \
|
||||
#
|
||||
ifeq ($$($1_DISABLE_SJAVAC)x$(ENABLE_JAVAC_SERVER), xyes)
|
||||
$1_JAVAC_CMD := $$($1_SJAVAC) $$($1_REMOTE)
|
||||
else
|
||||
$1_JAVAC_CMD := $$($1_JAVAC)
|
||||
endif
|
||||
|
||||
$1_EXTRA_DEPS := $$(BUILDTOOLS_OUTPUTDIR)/depend/_the.COMPILE_DEPEND_batch
|
||||
endif
|
||||
ifeq ($$($1_CREATE_API_DIGEST), true)
|
||||
$1_API_DIGEST_FLAGS := \
|
||||
-classpath $(BUILDTOOLS_OUTPUTDIR)/depend \
|
||||
-Xplugin:"depend $$($1_API_TARGET)" \
|
||||
#
|
||||
|
||||
# Create a file with all sources, to pass to javac in an @file.
|
||||
# $$($1_VARDEPS_FILE) is used as dependency to track changes in set of
|
||||
# list of files.
|
||||
$$($1_FILELIST): $$($1_SRCS) $$($1_VARDEPS_FILE)
|
||||
$1_EXTRA_DEPS := $(BUILDTOOLS_OUTPUTDIR)/depend/_the.COMPILE_DEPEND_batch
|
||||
endif
|
||||
|
||||
# When not using sjavac, pass along all sources to javac using an @file.
|
||||
$$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE) \
|
||||
$$($1_EXTRA_DEPS)
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(eval $$(call ListPathsSafely,$1_SRCS, $$@.tmp))
|
||||
$$(call LogWarn, Compiling $$(words $$($1_SRCS)) files for $1)
|
||||
$$(eval $$(call ListPathsSafely, $1_SRCS, $$($1_FILELIST)))
|
||||
|
||||
# Do the actual compilation
|
||||
$$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_FILELIST) $$($1_DEPENDS) \
|
||||
$$($1_VARDEPS_FILE) $$($1_EXTRA_DEPS)
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(call ExecuteWithLog, $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$$($1_SAFE_NAME)_batch, \
|
||||
$$($1_JAVAC_CMD) $$($1_FLAGS) \
|
||||
$$($1_JVM) $$($1_JAVAC_CMD) $$($1_FLAGS) \
|
||||
-implicit:none \
|
||||
$$($1_API_DIGEST_FLAGS) \
|
||||
-d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_FILELIST)) && \
|
||||
$(TOUCH) $$@
|
||||
-d $$($1_BIN) $$($1_HEADERS_ARG) @$$@.tmp) && \
|
||||
$(MV) $$@.tmp $$@
|
||||
endif
|
||||
|
||||
# Add all targets to main variable
|
||||
$1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_COMPILE_TARGET) \
|
||||
@@ -467,6 +506,7 @@ define SetupJavaCompilationBody
|
||||
EXTRA_MANIFEST_ATTR:=$$($1_EXTRA_MANIFEST_ATTR), \
|
||||
JARINDEX:=$$($1_JARINDEX), \
|
||||
HEADERS:=$$($1_HEADERS), \
|
||||
SETUP:=$$($1_SETUP), \
|
||||
))
|
||||
|
||||
# Add jar to target list
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2019, 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
|
||||
@@ -261,7 +261,33 @@ MakeTargetDir = \
|
||||
################################################################################
|
||||
# All install-file and related macros automatically call DecodeSpace when needed.
|
||||
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
ifeq ($(call isTargetOs, solaris), true)
|
||||
# On Solaris, if the target is a symlink and exists, cp won't overwrite.
|
||||
# Cp has to operate in recursive mode to allow for -P flag, to preserve soft links. If the
|
||||
# name of the target file differs from the source file, rename after copy.
|
||||
# If the source and target parent directories are the same, recursive copy doesn't work
|
||||
# so we fall back on regular copy, which isn't preserving symlinks.
|
||||
define install-file
|
||||
$(call MakeTargetDir)
|
||||
$(RM) '$(call DecodeSpace, $@)'
|
||||
if [ '$(call DecodeSpace, $(dir $(call EncodeSpace, $@)))' != \
|
||||
'$(call DecodeSpace, $(dir $(call EncodeSpace, $<)))' ]; then \
|
||||
$(CP) -f -r -P '$(call DecodeSpace, $<)' \
|
||||
'$(call DecodeSpace, $(dir $(call EncodeSpace, $@)))'; \
|
||||
if [ '$(call DecodeSpace, $(notdir $(call EncodeSpace, $@)))' != \
|
||||
'$(call DecodeSpace, $(notdir $(call EncodeSpace, $(<))))' ]; then \
|
||||
$(MV) '$(call DecodeSpace, $(dir $(call EncodeSpace, $@))/$(notdir $(call EncodeSpace, $<)))' \
|
||||
'$(call DecodeSpace, $@)'; \
|
||||
fi; \
|
||||
else \
|
||||
if [ -L '$(call DecodeSpace, $<)' ]; then \
|
||||
$(ECHO) "Source file is a symlink and target is in the same directory: $< $@" ; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
$(CP) -f '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'; \
|
||||
fi
|
||||
endef
|
||||
else ifeq ($(call isTargetOs, macosx), true)
|
||||
# On mac, extended attributes sometimes creep into the source files, which may later
|
||||
# cause the creation of ._* files which confuses testing. Clear these with xattr if
|
||||
# set. Some files get their write permissions removed after being copied to the
|
||||
@@ -439,13 +465,8 @@ endif
|
||||
# This is normally not needed since we use the FIXPATH prefix for command lines,
|
||||
# but might be needed in certain circumstances.
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
ifeq ($(call isBuildOsEnv, windows.wsl), true)
|
||||
FixPath = \
|
||||
$(shell $(WSLPATH) -m $1)
|
||||
else
|
||||
FixPath = \
|
||||
FixPath = \
|
||||
$(shell $(CYGPATH) -m $1)
|
||||
endif
|
||||
else
|
||||
FixPath = \
|
||||
$1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2019, 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
|
||||
@@ -112,6 +112,7 @@ PLATFORM_MODULES += \
|
||||
jdk.jsobject \
|
||||
jdk.localedata \
|
||||
jdk.naming.dns \
|
||||
jdk.scripting.nashorn \
|
||||
jdk.security.auth \
|
||||
jdk.security.jgss \
|
||||
jdk.xml.dom \
|
||||
@@ -122,9 +123,14 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
PLATFORM_MODULES += jdk.crypto.mscapi
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, solaris), true)
|
||||
PLATFORM_MODULES += jdk.crypto.ucrypto
|
||||
endif
|
||||
|
||||
JRE_TOOL_MODULES += \
|
||||
jdk.jdwp.agent \
|
||||
jdk.incubator.jpackage \
|
||||
jdk.scripting.nashorn.shell \
|
||||
#
|
||||
|
||||
################################################################################
|
||||
@@ -165,7 +171,8 @@ DOCS_MODULES += \
|
||||
jdk.naming.dns \
|
||||
jdk.naming.rmi \
|
||||
jdk.net \
|
||||
jdk.nio.mapmode \
|
||||
jdk.rmic \
|
||||
jdk.scripting.nashorn \
|
||||
jdk.sctp \
|
||||
jdk.security.auth \
|
||||
jdk.security.jgss \
|
||||
|
||||
@@ -204,67 +204,6 @@ DEPENDENCY_TARGET_SED_PATTERN := \
|
||||
-e 's/$$$$/ :/' \
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# When absolute paths are not allowed in the output, and the compiler does not
|
||||
# support any options to avoid it, we need to rewrite compile commands to use
|
||||
# relative paths. By doing this, the __FILE__ macro will resolve to relative
|
||||
# paths. The relevant input paths on the command line are the -I flags and the
|
||||
# path to the source file itself.
|
||||
#
|
||||
# The macro MakeCommandRelative is used to rewrite the command line like this:
|
||||
# 'CD $(WORKSPACE_ROOT) && <cmd>'
|
||||
# and changes all paths in cmd to be relative to the workspace root. This only
|
||||
# works properly if the build dir is inside the workspace root. If it's not,
|
||||
# relative paths are still calculated, but depending on the distance between the
|
||||
# dirs, paths in the build dir may end up as essentially absolute anyway.
|
||||
#
|
||||
# The fix-deps-file macro is used to adjust the contents of the generated make
|
||||
# dependency files to contain paths compatible with make.
|
||||
#
|
||||
ifeq ($(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT)-$(FILE_MACRO_CFLAGS), false-)
|
||||
# Need to handle -I flags as both '-Ifoo' and '-I foo'.
|
||||
MakeCommandRelative = \
|
||||
$(CD) $(WORKSPACE_ROOT) && \
|
||||
$(foreach o, $1, \
|
||||
$(if $(filter $(WORKSPACE_ROOT)/% $(OUTPUTDIR)/%, $o), \
|
||||
$(call RelativePath, $o, $(WORKSPACE_ROOT)) \
|
||||
, \
|
||||
$(if $(filter -I$(WORKSPACE_ROOT)/%, $o), \
|
||||
-I$(call RelativePath, $(patsubst -I%, %, $o), $(WORKSPACE_ROOT)) \
|
||||
, \
|
||||
$o \
|
||||
) \
|
||||
) \
|
||||
)
|
||||
|
||||
# When compiling with relative paths, the deps file comes out with relative
|
||||
# paths.
|
||||
define fix-deps-file
|
||||
$(SED) -e 's|^\([ ]*\)|\1$(WORKSPACE_ROOT)|' $1.tmp > $1
|
||||
endef
|
||||
else
|
||||
# By default the MakeCommandRelative macro does nothing.
|
||||
MakeCommandRelative = $1
|
||||
|
||||
# No adjustment is needed.
|
||||
define fix-deps-file
|
||||
$(MV) $1.tmp $1
|
||||
endef
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# GetEntitlementsFile
|
||||
# Find entitlements file for executable when signing on macosx. If no
|
||||
# specialized file is found, returns the default file.
|
||||
# $1 Executable to find entitlements file for.
|
||||
ENTITLEMENTS_DIR := $(TOPDIR)/make/data/macosxsigning
|
||||
DEFAULT_ENTITLEMENTS_FILE := $(ENTITLEMENTS_DIR)/default.plist
|
||||
|
||||
GetEntitlementsFile = \
|
||||
$(foreach f, $(ENTITLEMENTS_DIR)/$(strip $(notdir $1)).plist, \
|
||||
$(if $(wildcard $f), $f, $(DEFAULT_ENTITLEMENTS_FILE)) \
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# Create the recipe needed to compile a single native source file.
|
||||
#
|
||||
@@ -275,6 +214,7 @@ GetEntitlementsFile = \
|
||||
# Remaining parameters are named arguments:
|
||||
# FILE - The full path of the source file to compiler
|
||||
# BASE - The name of the rule for the entire binary to build ($1)
|
||||
# DISABLE_THIS_FILE_DEFINE - Set to true to disable the THIS_FILE define.
|
||||
#
|
||||
SetupCompileNativeFile = $(NamedParamsMacroTemplate)
|
||||
define SetupCompileNativeFileBody
|
||||
@@ -296,6 +236,12 @@ define SetupCompileNativeFileBody
|
||||
# This is the definite source file to use for $1_FILENAME.
|
||||
$1_SRC_FILE := $$($1_FILE)
|
||||
|
||||
ifneq ($$($1_DEFINE_THIS_FILE), false)
|
||||
ifneq ($$($$($1_BASE)_DEFINE_THIS_FILE), false)
|
||||
$1_THIS_FILE = -DTHIS_FILE='"$$($1_FILENAME)"'
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($$($1_OPTIMIZATION), )
|
||||
$1_OPT_CFLAGS := $$($$($1_BASE)_OPT_CFLAGS)
|
||||
$1_OPT_CXXFLAGS := $$($$($1_BASE)_OPT_CXXFLAGS)
|
||||
@@ -338,13 +284,13 @@ define SetupCompileNativeFileBody
|
||||
ifneq ($$(filter %.c, $$($1_FILENAME)), )
|
||||
# Compile as a C file
|
||||
$1_FLAGS := $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) $$($1_BASE_CFLAGS) \
|
||||
$$($1_OPT_CFLAGS) $$($1_CFLAGS) -c
|
||||
$$($1_OPT_CFLAGS) $$($1_CFLAGS) $$($1_THIS_FILE) -c
|
||||
$1_COMPILER := $$($$($1_BASE)_CC)
|
||||
$1_DEP_FLAG := $(C_FLAG_DEPS)
|
||||
else ifneq ($$(filter %.m, $$($1_FILENAME)), )
|
||||
# Compile as an Objective-C file
|
||||
$1_FLAGS := -x objective-c $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) \
|
||||
$$($1_BASE_CFLAGS) $$($1_OPT_CFLAGS) $$($1_CFLAGS) -c
|
||||
$$($1_BASE_CFLAGS) $$($1_OPT_CFLAGS) $$($1_CFLAGS) $$($1_THIS_FILE) -c
|
||||
$1_COMPILER := $$($$($1_BASE)_CC)
|
||||
$1_DEP_FLAG := $(C_FLAG_DEPS)
|
||||
else ifneq ($$(filter %.s %.S, $$($1_FILENAME)), )
|
||||
@@ -355,7 +301,7 @@ define SetupCompileNativeFileBody
|
||||
else ifneq ($$(filter %.cpp %.cc %.mm, $$($1_FILENAME)), )
|
||||
# Compile as a C++ or Objective-C++ file
|
||||
$1_FLAGS := $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) $$($1_BASE_CXXFLAGS) \
|
||||
$$($1_OPT_CXXFLAGS) $$($1_CXXFLAGS) -c
|
||||
$$($1_OPT_CXXFLAGS) $$($1_CXXFLAGS) $$($1_THIS_FILE) -c
|
||||
$1_COMPILER := $$($$($1_BASE)_CXX)
|
||||
$1_DEP_FLAG := $(CXX_FLAG_DEPS)
|
||||
else
|
||||
@@ -395,17 +341,21 @@ define SetupCompileNativeFileBody
|
||||
$$(call LogInfo, Compiling $$($1_FILENAME) (for $$($$($1_BASE)_BASENAME)))
|
||||
$$(call MakeDir, $$(@D))
|
||||
ifneq ($(TOOLCHAIN_TYPE), microsoft)
|
||||
$$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \
|
||||
$$($1_COMPILER) $$($1_DEP_FLAG) \
|
||||
$$(addsuffix .tmp, $$($1_DEPS_FILE)) \
|
||||
$$($1_COMPILE_OPTIONS)))
|
||||
ifeq ($(TOOLCHAIN_TYPE)$$(filter %.s, $$($1_FILENAME)), solstudio)
|
||||
# The Solaris studio compiler doesn't output the full path to the
|
||||
# object file in the generated deps files. Fixing it with sed. If
|
||||
# compiling assembly, don't try this.
|
||||
$$(call ExecuteWithLog, $$@, \
|
||||
$$($1_COMPILER) $$($1_DEP_FLAG) $$($1_DEPS_FILE).tmp $$($1_COMPILE_OPTIONS))
|
||||
$(SED) 's|^$$(@F):|$$@:|' $$($1_DEPS_FILE).tmp > $$($1_DEPS_FILE)
|
||||
else
|
||||
$$(call ExecuteWithLog, $$@, \
|
||||
$$($1_COMPILER) $$($1_DEP_FLAG) $$($1_DEPS_FILE) $$($1_COMPILE_OPTIONS))
|
||||
endif
|
||||
# Create a dependency target file from the dependency file.
|
||||
# Solution suggested by http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
|
||||
ifneq ($$($1_DEPS_FILE), )
|
||||
$$(call fix-deps-file, $$($1_DEPS_FILE))
|
||||
# Create a dependency target file from the dependency file.
|
||||
# Solution suggested by:
|
||||
# http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
|
||||
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_DEPS_FILE) \
|
||||
> $$($1_DEPS_TARGETS_FILE)
|
||||
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_DEPS_FILE) > $$($1_DEPS_TARGETS_FILE)
|
||||
endif
|
||||
else
|
||||
# The Visual Studio compiler lacks a feature for generating make
|
||||
@@ -415,8 +365,8 @@ define SetupCompileNativeFileBody
|
||||
# Keep as much as possible on one execution line for best performance
|
||||
# on Windows. No need to save exit code from compilation since
|
||||
# pipefail is always active on Windows.
|
||||
$$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \
|
||||
$$($1_COMPILER) -showIncludes $$($1_COMPILE_OPTIONS))) \
|
||||
$$(call ExecuteWithLog, $$@, \
|
||||
$$($1_COMPILER) -showIncludes $$($1_COMPILE_OPTIONS)) \
|
||||
| $(TR) -d '\r' | $(GREP) -v -e "^Note: including file:" \
|
||||
-e "^$$($1_FILENAME)$$$$" || test "$$$$?" = "1" ; \
|
||||
$(ECHO) $$@: \\ > $$($1_DEPS_FILE) ; \
|
||||
@@ -460,6 +410,7 @@ endef
|
||||
# RC_FLAGS flags for RC.
|
||||
# EMBED_MANIFEST if true, embed manifest on Windows.
|
||||
# MAPFILE mapfile
|
||||
# REORDER reorder file
|
||||
# USE_MAPFILE_FOR_SYMBOLS if true and this is a STATIC_BUILD, just copy the
|
||||
# mapfile for the output symbols file
|
||||
# CC the compiler to use, default is $(CC)
|
||||
@@ -479,6 +430,7 @@ endef
|
||||
# STRIPFLAGS Optionally change the flags given to the strip command
|
||||
# PRECOMPILED_HEADER Header file to use as precompiled header
|
||||
# PRECOMPILED_HEADER_EXCLUDE List of source files that should not use PCH
|
||||
# DEFINE_THIS_FILE Set to false to not set the THIS_FILE preprocessor macro
|
||||
#
|
||||
# After being called, some variables are exported from this macro, all prefixed
|
||||
# with parameter 1 followed by a '_':
|
||||
@@ -697,6 +649,11 @@ define SetupNativeCompilationBody
|
||||
$1_EXTRA_ASFLAGS += $$(ASFLAGS_DEBUG_SYMBOLS)
|
||||
endif
|
||||
|
||||
ifneq ($$($1_REORDER), )
|
||||
$1_EXTRA_CFLAGS += $$(C_FLAG_REORDER)
|
||||
$1_EXTRA_CXXFLAGS += $$(C_FLAG_REORDER)
|
||||
endif
|
||||
|
||||
# Pass the library name for static JNI library naming
|
||||
ifeq ($$($1_TYPE), STATIC_LIBRARY)
|
||||
$1_EXTRA_CFLAGS += -DLIBRARY_NAME=$$($1_NAME)
|
||||
@@ -730,6 +687,7 @@ define SetupNativeCompilationBody
|
||||
ifeq ($$($1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE)), true)
|
||||
$1_EXTRA_CFLAGS += $(CFLAGS_WARNINGS_ARE_ERRORS)
|
||||
$1_EXTRA_CXXFLAGS += $(CFLAGS_WARNINGS_ARE_ERRORS)
|
||||
$1_EXTRA_LDFLAGS += $(LDFLAGS_WARNINGS_ARE_ERRORS)
|
||||
endif
|
||||
|
||||
ifeq (NONE, $$($1_OPTIMIZATION))
|
||||
@@ -776,6 +734,7 @@ define SetupNativeCompilationBody
|
||||
FILE := $$($1_GENERATED_PCH_SRC), \
|
||||
BASE := $1, \
|
||||
EXTRA_CXXFLAGS := -Fp$$($1_PCH_FILE) -Yc$$(notdir $$($1_PRECOMPILED_HEADER)), \
|
||||
DEFINE_THIS_FILE := false, \
|
||||
))
|
||||
|
||||
$1_USE_PCH_FLAGS := \
|
||||
@@ -810,8 +769,7 @@ define SetupNativeCompilationBody
|
||||
$$($1_PCH_FILE): $$($1_PRECOMPILED_HEADER) $$($1_COMPILE_VARDEPS_FILE)
|
||||
$$(call LogInfo, Generating precompiled header)
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \
|
||||
$$($1_PCH_COMMAND) $$< -o $$@))
|
||||
$$(call ExecuteWithLog, $$@, $$($1_PCH_COMMAND) $$< -o $$@)
|
||||
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_PCH_DEPS_FILE) \
|
||||
> $$($1_PCH_DEPS_TARGETS_FILE)
|
||||
|
||||
@@ -867,9 +825,9 @@ define SetupNativeCompilationBody
|
||||
$$($1_RES): $$($1_VERSIONINFO_RESOURCE) $$($1_RES_VARDEPS_FILE)
|
||||
$$(call LogInfo, Compiling resource $$(notdir $$($1_VERSIONINFO_RESOURCE)) (for $$($1_BASENAME)))
|
||||
$$(call MakeDir, $$(@D) $$($1_OBJECT_DIR))
|
||||
$$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \
|
||||
$$(call ExecuteWithLog, $$@, \
|
||||
$$($1_RC) $$($1_RC_FLAGS) $$($1_SYSROOT_CFLAGS) $(CC_OUT_OPTION)$$@ \
|
||||
$$($1_VERSIONINFO_RESOURCE) 2>&1 ))
|
||||
$$($1_VERSIONINFO_RESOURCE) 2>&1 )
|
||||
# Windows RC compiler does not support -showIncludes, so we mis-use CL
|
||||
# for this. Filter out RC specific arguments that are unknown to CL.
|
||||
# For some unknown reason, in this case CL actually outputs the show
|
||||
@@ -921,6 +879,17 @@ define SetupNativeCompilationBody
|
||||
|
||||
ifneq ($(DISABLE_MAPFILES), true)
|
||||
$1_REAL_MAPFILE := $$($1_MAPFILE)
|
||||
ifeq ($(call isTargetOs, windows), false)
|
||||
ifneq ($$($1_REORDER), )
|
||||
$1_REAL_MAPFILE := $$($1_OBJECT_DIR)/mapfile
|
||||
|
||||
$$($1_REAL_MAPFILE) : $$($1_MAPFILE) $$($1_REORDER)
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(CP) $$($1_MAPFILE) $$@.tmp
|
||||
$$(SED) -e 's=OUTPUTDIR=$$($1_OBJECT_DIR)=' $$($1_REORDER) >> $$@.tmp
|
||||
$$(MV) $$@.tmp $$@
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Pickup extra OPENJDK_TARGET_OS_TYPE and/or OPENJDK_TARGET_OS dependent variables
|
||||
@@ -954,7 +923,7 @@ define SetupNativeCompilationBody
|
||||
$1_DEBUGINFO_FILES := $$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).pdb \
|
||||
$$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).map
|
||||
|
||||
else ifeq ($(call isTargetOs, linux), true)
|
||||
else ifeq ($(call isTargetOs, linux solaris), true)
|
||||
$1_DEBUGINFO_FILES := $$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).debuginfo
|
||||
# Setup the command line creating debuginfo files, to be run after linking.
|
||||
# It cannot be run separately since it updates the original target file
|
||||
@@ -1017,7 +986,7 @@ define SetupNativeCompilationBody
|
||||
endif
|
||||
|
||||
ifeq ($$($1_TYPE), STATIC_LIBRARY)
|
||||
$1_VARDEPS := $$($1_AR) $$(ARFLAGS) $$($1_ARFLAGS) $$($1_LIBS) \
|
||||
$1_VARDEPS := $$($1_AR) $$($1_ARFLAGS) $$($1_LIBS) \
|
||||
$$($1_EXTRA_LIBS)
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
|
||||
@@ -1035,7 +1004,7 @@ define SetupNativeCompilationBody
|
||||
$$(call LogInfo, Building static library $$($1_BASENAME))
|
||||
$$(call MakeDir, $$($1_OUTPUT_DIR) $$($1_SYMBOLS_DIR))
|
||||
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
|
||||
$$($1_AR) $$(ARFLAGS) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_ALL_OBJS) \
|
||||
$$($1_AR) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_ALL_OBJS) \
|
||||
$$($1_RES))
|
||||
ifeq ($(STATIC_BUILD), true)
|
||||
ifeq ($$($1_USE_MAPFILE_FOR_SYMBOLS), true)
|
||||
@@ -1081,7 +1050,7 @@ define SetupNativeCompilationBody
|
||||
endif
|
||||
|
||||
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
|
||||
$$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \
|
||||
$$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \
|
||||
$$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION) \
|
||||
$$($1_STRIP_CMD)
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||
@@ -1140,7 +1109,7 @@ define SetupNativeCompilationBody
|
||||
|
||||
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
|
||||
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
|
||||
$(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) \
|
||||
$(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
|
||||
$$($1_LIBS) $$($1_EXTRA_LIBS)) \
|
||||
| $(GREP) -v "^ Creating library .*\.lib and object .*\.exp" || \
|
||||
test "$$$$?" = "1" ; \
|
||||
@@ -1150,7 +1119,7 @@ define SetupNativeCompilationBody
|
||||
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
|
||||
$$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUTDIR) ; ) \
|
||||
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
|
||||
$(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) \
|
||||
$(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
|
||||
$$($1_LIBS) $$($1_EXTRA_LIBS)) ; \
|
||||
$$($1_CREATE_DEBUGINFO_CMDS)
|
||||
$$($1_STRIP_CMD)
|
||||
@@ -1164,7 +1133,7 @@ define SetupNativeCompilationBody
|
||||
# silently fail otherwise.
|
||||
ifneq ($(CODESIGN), )
|
||||
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" --timestamp --options runtime \
|
||||
--entitlements $$(call GetEntitlementsFile, $$@) $$@
|
||||
--entitlements $(TOPDIR)/make/data/macosxsigning/entitlements.plist $$@
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
104
make/common/SetupJavaCompilers.gmk
Normal file
104
make/common/SetupJavaCompilers.gmk
Normal file
@@ -0,0 +1,104 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, 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.
|
||||
#
|
||||
|
||||
ifndef _SETUP_GMK
|
||||
_SETUP_GMK := 1
|
||||
|
||||
# Include custom extension hook
|
||||
$(eval $(call IncludeCustomExtension, common/SetupJavaCompilers.gmk))
|
||||
|
||||
include JavaCompilation.gmk
|
||||
|
||||
JDK_SOURCE_TARGET_FLAGS := -source $(JDK_SOURCE_TARGET_VERSION) \
|
||||
-target $(JDK_SOURCE_TARGET_VERSION)
|
||||
|
||||
# If warnings needs to be non-fatal for testing purposes use a command like:
|
||||
# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
|
||||
JAVAC_WARNINGS ?= -Xlint:all -Werror
|
||||
|
||||
# The BOOT_JAVAC setup uses the boot jdk compiler to compile the tools
|
||||
# and the interim javac, to be run by the boot jdk.
|
||||
$(eval $(call SetupJavaCompiler,BOOT_JAVAC, \
|
||||
JAVAC := $(JAVAC), \
|
||||
FLAGS := \
|
||||
$(JAVA_TOOL_FLAGS_SMALL) \
|
||||
$(BOOT_JDK_SOURCETARGET) \
|
||||
-XDignore.symbol.file=true -g \
|
||||
$(JAVAC_WARNINGS) -Xlint:-options, \
|
||||
DISABLE_SJAVAC := true, \
|
||||
))
|
||||
|
||||
# Any java code executed during a JDK build to build other parts of the JDK must be
|
||||
# executed by the bootstrap JDK (probably with -Xbootclasspath/p: ) and for this
|
||||
# purpose must be built with -target PREVIOUS for bootstrapping purposes, which
|
||||
# requires restricting to language level and api of previous JDK.
|
||||
#
|
||||
# The generate old bytecode javac setup uses the new compiler to compile for the
|
||||
# boot jdk to generate tools that need to be run with the boot jdk.
|
||||
# Thus we force the target bytecode to the previous JDK version.
|
||||
# Add -Xlint:-options to avoid the warning about not setting -bootclasspath. Since
|
||||
# it's running on the boot jdk, the default bootclasspath is correct.
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \
|
||||
JVM := $(JAVA_SMALL), \
|
||||
JAVAC := $(NEW_JAVAC), \
|
||||
FLAGS := $(BOOT_JDK_SOURCETARGET) -XDignore.symbol.file=true -XDstringConcat=inline \
|
||||
$(JAVAC_WARNINGS) -Xlint:-options, \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
||||
|
||||
# The generate new bytecode javac setup uses the new compiler to compile for the
|
||||
# new jdk. This new bytecode might only be possible to run using the new jvm.
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \
|
||||
JVM := $(JAVA_JAVAC), \
|
||||
JAVAC := $(NEW_JAVAC), \
|
||||
FLAGS := $(JDK_SOURCE_TARGET_FLAGS) --doclint-format html5 \
|
||||
-encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS), \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
||||
|
||||
# After the jdk is built, we want to build demos using only the recently
|
||||
# generated jdk classes and nothing else, no jdk source, etc etc.
|
||||
# I.e. the rt.jar, but since rt.jar has not yet been generated
|
||||
# (it will be in "make images") therefore we use classes instead.
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_USINGJDKBYTECODE, \
|
||||
JVM := $(JAVA_SMALL), \
|
||||
JAVAC := $(NEW_JAVAC), \
|
||||
FLAGS := --upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none \
|
||||
$(JAVAC_WARNINGS), \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
||||
|
||||
# Use boot javac to generate JDK 8 compatible class files explicitly
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_8_BYTECODE, \
|
||||
JAVAC := $(JAVAC), \
|
||||
FLAGS := \
|
||||
$(JAVA_TOOL_FLAGS_SMALL) \
|
||||
--release 8 \
|
||||
-XDignore.symbol.file=true -g \
|
||||
$(JAVAC_WARNINGS), \
|
||||
DISABLE_SJAVAC := true, \
|
||||
))
|
||||
|
||||
endif # _SETUP_GMK
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2019, 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
|
||||
@@ -98,6 +98,7 @@ define SetupTestFilesCompilationBody
|
||||
DISABLED_WARNINGS_gcc := format undef unused-function unused-value, \
|
||||
DISABLED_WARNINGS_clang := undef format-nonliteral \
|
||||
missing-field-initializers sometimes-uninitialized, \
|
||||
DISABLED_WARNINGS_CXX_solstudio := wvarhidenmem doubunder, \
|
||||
LIBS := $$($1_LIBS_$$(name)), \
|
||||
TOOLCHAIN := $(if $$(filter %.cpp, $$(file)), TOOLCHAIN_LINK_CXX, TOOLCHAIN_DEFAULT), \
|
||||
OPTIMIZATION := $$(if $$($1_OPTIMIZATION_$$(name)),$$($1_OPTIMIZATION_$$(name)),LOW), \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2019, 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
|
||||
@@ -296,8 +296,8 @@ check-jvm-variant = \
|
||||
# Returns true if the actual property matches one of the properties in the list,
|
||||
# and false otherwise.
|
||||
#
|
||||
# Examples: $(call isTargetOs, linux windows) will return true when executed
|
||||
# on either linux or windows, and false otherwise.
|
||||
# Examples: $(call isTargetOs, linux solaris) will return true when executed
|
||||
# on either linux or solaris, and false otherwise.
|
||||
# $(call isBuildCpuArch, x86) will return true iff the build CPU Arch is x86.
|
||||
|
||||
isTargetOs = \
|
||||
|
||||
@@ -239,8 +239,8 @@ var getJibProfilesCommon = function (input, data) {
|
||||
|
||||
// List of the main profile names used for iteration
|
||||
common.main_profile_names = [
|
||||
"linux-x64", "linux-x86", "macosx-x64",
|
||||
"windows-x64", "windows-x86",
|
||||
"linux-x64", "linux-x86", "macosx-x64", "solaris-x64",
|
||||
"solaris-sparcv9", "windows-x64", "windows-x86",
|
||||
"linux-aarch64", "linux-arm32", "linux-ppc64le", "linux-s390x"
|
||||
];
|
||||
|
||||
@@ -248,7 +248,7 @@ var getJibProfilesCommon = function (input, data) {
|
||||
common.main_profile_base = {
|
||||
dependencies: ["boot_jdk", "gnumake", "jtreg", "jib", "autoconf", "jmh", "jcov"],
|
||||
default_make_targets: ["product-bundles", "test-bundles", "static-libs-bundles"],
|
||||
configure_args: concat("--enable-jtreg-failure-handler",
|
||||
configure_args: concat(["--enable-jtreg-failure-handler"],
|
||||
"--with-exclude-translations=de,es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I,zh_TW,zh_HK",
|
||||
"--disable-manpages",
|
||||
"--disable-jvm-feature-shenandoahgc",
|
||||
@@ -381,8 +381,8 @@ var getJibProfilesCommon = function (input, data) {
|
||||
};
|
||||
};
|
||||
|
||||
common.boot_jdk_version = "14";
|
||||
common.boot_jdk_build_number = "36";
|
||||
common.boot_jdk_version = "13";
|
||||
common.boot_jdk_build_number = "33";
|
||||
common.boot_jdk_home = input.get("boot_jdk", "install_path") + "/jdk-"
|
||||
+ common.boot_jdk_version
|
||||
+ (input.build_os == "macosx" ? ".jdk/Contents/Home" : "");
|
||||
@@ -404,7 +404,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"linux-x64": {
|
||||
target_os: "linux",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "graphviz", "pandoc", "graalunit_lib"],
|
||||
dependencies: ["devkit", "graphviz", "pandoc", "graalunit_lib"],
|
||||
configure_args: concat(common.configure_args_64bit,
|
||||
"--enable-full-docs", "--with-zlib=system",
|
||||
(isWsl(input) ? [ "--host=x86_64-unknown-linux-gnu",
|
||||
@@ -416,7 +416,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
target_os: "linux",
|
||||
target_cpu: "x86",
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest"],
|
||||
dependencies: ["devkit"],
|
||||
configure_args: concat(common.configure_args_32bit,
|
||||
"--with-jvm-variants=minimal,server", "--with-zlib=system"),
|
||||
},
|
||||
@@ -424,15 +424,31 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"macosx-x64": {
|
||||
target_os: "macosx",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "pandoc", "graalunit_lib"],
|
||||
dependencies: ["devkit", "pandoc", "graalunit_lib"],
|
||||
configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
|
||||
"--with-macosx-version-max=10.9.0"),
|
||||
},
|
||||
|
||||
"solaris-x64": {
|
||||
target_os: "solaris",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit", "cups"],
|
||||
configure_args: concat(common.configure_args_64bit,
|
||||
"--with-zlib=system", "--enable-dtrace", "--enable-deprecated-ports=yes"),
|
||||
},
|
||||
|
||||
"solaris-sparcv9": {
|
||||
target_os: "solaris",
|
||||
target_cpu: "sparcv9",
|
||||
dependencies: ["devkit", "cups"],
|
||||
configure_args: concat(common.configure_args_64bit,
|
||||
"--with-zlib=system", "--enable-dtrace", "--enable-deprecated-ports=yes"),
|
||||
},
|
||||
|
||||
"windows-x64": {
|
||||
target_os: "windows",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "pandoc", "graalunit_lib"],
|
||||
dependencies: ["devkit", "pandoc", "graalunit_lib"],
|
||||
configure_args: concat(common.configure_args_64bit),
|
||||
},
|
||||
|
||||
@@ -440,7 +456,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
target_os: "windows",
|
||||
target_cpu: "x86",
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest"],
|
||||
dependencies: ["devkit"],
|
||||
configure_args: concat(common.configure_args_32bit),
|
||||
},
|
||||
|
||||
@@ -448,12 +464,9 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
target_os: "linux",
|
||||
target_cpu: "aarch64",
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "build_devkit", "pandoc"],
|
||||
dependencies: ["devkit", "build_devkit", "cups"],
|
||||
configure_args: [
|
||||
"--openjdk-target=aarch64-linux-gnu",
|
||||
"--disable-jvm-feature-jvmci",
|
||||
"--disable-jvm-feature-graal",
|
||||
"--disable-jvm-feature-aot",
|
||||
],
|
||||
},
|
||||
|
||||
@@ -461,7 +474,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
target_os: "linux",
|
||||
target_cpu: "arm",
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "build_devkit"],
|
||||
dependencies: ["devkit", "build_devkit", "cups"],
|
||||
configure_args: [
|
||||
"--openjdk-target=arm-linux-gnueabihf", "--with-freetype=bundled",
|
||||
"--with-abi-profile=arm-vfp-hflt", "--disable-warnings-as-errors"
|
||||
@@ -472,7 +485,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
target_os: "linux",
|
||||
target_cpu: "ppc64le",
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "build_devkit"],
|
||||
dependencies: ["devkit", "build_devkit", "cups"],
|
||||
configure_args: [
|
||||
"--openjdk-target=ppc64le-linux-gnu", "--with-freetype=bundled",
|
||||
"--disable-warnings-as-errors"
|
||||
@@ -483,7 +496,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
target_os: "linux",
|
||||
target_cpu: "s390x",
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "build_devkit"],
|
||||
dependencies: ["devkit", "build_devkit", "cups"],
|
||||
configure_args: [
|
||||
"--openjdk-target=s390x-linux-gnu", "--with-freetype=bundled",
|
||||
"--disable-warnings-as-errors"
|
||||
@@ -517,7 +530,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"ANT_HOME": input.get("ant", "home_path")
|
||||
}
|
||||
};
|
||||
[ "linux-x64", "macosx-x64", "windows-x64"]
|
||||
[ "linux-x64", "macosx-x64", "solaris-sparcv9", "solaris-x64", "windows-x64"]
|
||||
.forEach(function (name) {
|
||||
var maketestName = name + "-testmake";
|
||||
profiles[maketestName] = concatObjects(profiles[name], testmakeBase);
|
||||
@@ -538,7 +551,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"linux-x64-zero": {
|
||||
target_os: "linux",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest"],
|
||||
dependencies: ["devkit"],
|
||||
configure_args: concat(common.configure_args_64bit, [
|
||||
"--with-zlib=system",
|
||||
"--with-jvm-variants=zero",
|
||||
@@ -550,7 +563,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
target_os: "linux",
|
||||
target_cpu: "x86",
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest"],
|
||||
dependencies: ["devkit"],
|
||||
configure_args: concat(common.configure_args_32bit, [
|
||||
"--with-zlib=system",
|
||||
"--with-jvm-variants=zero",
|
||||
@@ -573,7 +586,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"linux-x64-debug-nopch": {
|
||||
target_os: "linux",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest"],
|
||||
dependencies: ["devkit"],
|
||||
configure_args: concat(common.configure_args_64bit,
|
||||
"--with-zlib=system", "--disable-precompiled-headers"),
|
||||
},
|
||||
@@ -591,7 +604,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
// Bootcycle profiles runs the build with itself as the boot jdk. This can
|
||||
// be done in two ways. Either using the builtin bootcycle target in the
|
||||
// build system. Or by supplying the main jdk build as bootjdk to configure.
|
||||
[ "linux-x64", "macosx-x64", "windows-x64" ]
|
||||
[ "linux-x64", "macosx-x64", "solaris-sparcv9", "windows-x64"]
|
||||
.forEach(function (name) {
|
||||
var bootcycleName = name + "-bootcycle";
|
||||
var bootcyclePrebuiltName = name + "-bootcycle-prebuilt";
|
||||
@@ -602,13 +615,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
// The prebuilt bootcycle variant modifies the boot jdk argument
|
||||
var bootcyclePrebuiltBase = {
|
||||
dependencies: [ name + ".jdk" ],
|
||||
configure_args: [
|
||||
"--with-boot-jdk=" + input.get(name + ".jdk", "home_path"),
|
||||
// Full docs do not currently work with bootcycle build
|
||||
// since Nashorn was removed. This negates the
|
||||
// --enable-full-docs from the main profile.
|
||||
"--enable-full-docs=auto",
|
||||
]
|
||||
configure_args: "--with-boot-jdk=" + input.get(name + ".jdk", "home_path"),
|
||||
}
|
||||
profiles[bootcyclePrebuiltName] = concatObjects(profiles[name],
|
||||
bootcyclePrebuiltBase);
|
||||
@@ -618,7 +625,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
});
|
||||
|
||||
// JCov profiles build JCov-instrumented JDK image based on images provided through dependencies.
|
||||
[ "linux-aarch64", "linux-x64", "macosx-x64", "windows-x64" ]
|
||||
[ "linux-aarch64", "linux-x64", "macosx-x64", "solaris-sparcv9", "windows-x64"]
|
||||
.forEach(function (name) {
|
||||
var jcovName = name + "-jcov";
|
||||
profiles[jcovName] = clone(common.main_profile_base);
|
||||
@@ -647,6 +654,12 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
platform: "osx-x64",
|
||||
jdk_subdir: "jdk-" + data.version + ".jdk/Contents/Home",
|
||||
},
|
||||
"solaris-x64": {
|
||||
platform: "solaris-x64",
|
||||
},
|
||||
"solaris-sparcv9": {
|
||||
platform: "solaris-sparcv9",
|
||||
},
|
||||
"windows-x64": {
|
||||
platform: "windows-x64",
|
||||
jdk_suffix: "zip",
|
||||
@@ -763,17 +776,13 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
= concat(profiles[cmpBaselineName].default_make_targets, "docs");
|
||||
}
|
||||
profiles[cmpBaselineName].make_args = [ "COMPARE_BUILD=CONF=" ];
|
||||
profiles[cmpBaselineName].configure_args = concat(
|
||||
profiles[cmpBaselineName].configure_args,
|
||||
"--with-hotspot-build-time=n/a",
|
||||
"--disable-precompiled-headers");
|
||||
// Do not inherit artifact definitions from base profile
|
||||
delete profiles[cmpBaselineName].artifacts;
|
||||
});
|
||||
});
|
||||
|
||||
// Artifacts of JCov profiles
|
||||
[ "linux-aarch64", "linux-x64", "macosx-x64", "windows-x64" ]
|
||||
[ "linux-aarch64", "linux-x64", "macosx-x64", "solaris-sparcv9", "windows-x64"]
|
||||
.forEach(function (name) {
|
||||
var o = artifactData[name]
|
||||
var jdk_subdir = (o.jdk_subdir != null ? o.jdk_subdir : "jdk-" + data.version);
|
||||
@@ -872,7 +881,6 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
make_args: testOnlyMake,
|
||||
environment: {
|
||||
"BOOT_JDK": common.boot_jdk_home,
|
||||
"JT_HOME": input.get("jtreg", "home_path"),
|
||||
"JDK_IMAGE_DIR": input.get(testedProfileJdk, "home_path"),
|
||||
"TEST_IMAGE_DIR": input.get(testedProfileTest, "home_path")
|
||||
},
|
||||
@@ -960,10 +968,12 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
var getJibProfilesDependencies = function (input, common) {
|
||||
|
||||
var devkit_platform_revisions = {
|
||||
linux_x64: "gcc9.2.0-OL6.4+1.0",
|
||||
linux_x64: "gcc8.3.0-OL6.4+1.0",
|
||||
macosx_x64: "Xcode10.1-MacOSX10.14+1.0",
|
||||
windows_x64: "VS2019-16.5.3+1.0",
|
||||
linux_aarch64: "gcc9.2.0-OL7.6+1.0",
|
||||
solaris_x64: "SS12u4-Solaris11u1+1.0",
|
||||
solaris_sparcv9: "SS12u6-Solaris11u3+1.0",
|
||||
windows_x64: "VS2017-15.9.16+1.0",
|
||||
linux_aarch64: "gcc8.3.0-OL7.6+1.0",
|
||||
linux_arm: "gcc8.2.0-Fedora27+1.0",
|
||||
linux_ppc64le: "gcc8.2.0-Fedora27+1.0",
|
||||
linux_s390x: "gcc8.2.0-Fedora27+1.0"
|
||||
@@ -974,11 +984,9 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
: input.target_platform);
|
||||
|
||||
var devkit_cross_prefix = "";
|
||||
if (!(input.target_os == "windows" && isWsl(input))) {
|
||||
if (input.build_platform != input.target_platform
|
||||
&& input.build_platform != devkit_platform) {
|
||||
devkit_cross_prefix = input.build_platform + "-to-";
|
||||
}
|
||||
if (input.build_platform != input.target_platform
|
||||
&& input.build_platform != devkit_platform) {
|
||||
devkit_cross_prefix = input.build_platform + "-to-";
|
||||
}
|
||||
|
||||
var boot_jdk_platform = (input.build_os == "macosx" ? "osx" : input.build_os)
|
||||
@@ -996,16 +1004,16 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
: input.get("gnumake", "install_path") + "/bin");
|
||||
|
||||
if (input.build_cpu == 'aarch64') {
|
||||
boot_jdk = {
|
||||
boot_jdk = {
|
||||
organization: common.organization,
|
||||
ext: "tar.gz",
|
||||
module: "jdk-linux_aarch64",
|
||||
revision: "14+1.0",
|
||||
revision: "13+1.0",
|
||||
configure_args: "--with-boot-jdk=" + common.boot_jdk_home,
|
||||
environment_path: common.boot_jdk_home + "/bin"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
boot_jdk = {
|
||||
boot_jdk = {
|
||||
server: "jpg",
|
||||
product: "jdk",
|
||||
version: common.boot_jdk_version,
|
||||
@@ -1014,7 +1022,7 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
+ boot_jdk_platform + "_bin" + boot_jdk_ext,
|
||||
configure_args: "--with-boot-jdk=" + common.boot_jdk_home,
|
||||
environment_path: common.boot_jdk_home + "/bin"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var dependencies = {
|
||||
@@ -1051,8 +1059,7 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
checksum_file: "MD5_VALUES",
|
||||
file: "bundles/jtreg_bin-5.0.zip",
|
||||
environment_name: "JT_HOME",
|
||||
environment_path: input.get("jtreg", "home_path") + "/bin",
|
||||
configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"),
|
||||
environment_path: input.get("jtreg", "install_path") + "/jtreg/bin"
|
||||
},
|
||||
|
||||
jmh: {
|
||||
@@ -1117,7 +1124,7 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
pandoc: {
|
||||
organization: common.organization,
|
||||
ext: "tar.gz",
|
||||
revision: (input.build_cpu == 'aarch64' ? "2.5+1.0" : "2.3.1+1.0"),
|
||||
revision: "2.3.1+1.0",
|
||||
module: "pandoc-" + input.build_platform,
|
||||
configure_args: "PANDOC=" + input.get("pandoc", "install_path") + "/pandoc/pandoc",
|
||||
environment_path: input.get("pandoc", "install_path") + "/pandoc"
|
||||
@@ -1148,12 +1155,6 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
configure_args: "--with-graalunit-lib=" + input.get("graalunit_lib", "install_path"),
|
||||
environment_name: "GRAALUNIT_LIB"
|
||||
},
|
||||
|
||||
gtest: {
|
||||
organization: common.organization,
|
||||
ext: "tar.gz",
|
||||
revision: "1.8.1"
|
||||
},
|
||||
};
|
||||
|
||||
return dependencies;
|
||||
|
||||
255
make/copy/Copy-java.base.gmk
Normal file
255
make/copy/Copy-java.base.gmk
Normal file
@@ -0,0 +1,255 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2019, 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 CopyCommon.gmk
|
||||
include Modules.gmk
|
||||
include TextFileProcessing.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
ifeq ($(call isTargetOs, aix), true)
|
||||
|
||||
TZMAPPINGS_SRC := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf
|
||||
|
||||
$(LIB_DST_DIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
|
||||
$(call install-file)
|
||||
|
||||
TARGETS += $(LIB_DST_DIR)/tzmappings
|
||||
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Copy the microsoft runtime libraries on windows
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
|
||||
# Chmod to avoid permission issues if bundles are unpacked on unix platforms.
|
||||
define copy-and-chmod
|
||||
$(install-file)
|
||||
$(CHMOD) a+rx $@
|
||||
endef
|
||||
|
||||
# Use separate macro calls in case the source files are not in the same
|
||||
# directory.
|
||||
$(eval $(call SetupCopyFiles,COPY_MSVCR, \
|
||||
DEST := $(LIB_DST_DIR), \
|
||||
FILES := $(MSVCR_DLL), \
|
||||
MACRO := copy-and-chmod))
|
||||
|
||||
$(eval $(call SetupCopyFiles,COPY_MSVCP, \
|
||||
DEST := $(LIB_DST_DIR), \
|
||||
FILES := $(MSVCP_DLL), \
|
||||
MACRO := copy-and-chmod))
|
||||
|
||||
TARGETS += $(COPY_MSVCR) $(COPY_MSVCP)
|
||||
|
||||
ifneq ($(UCRT_DLL_DIR), )
|
||||
$(eval $(call SetupCopyFiles, COPY_UCRT_DLLS, \
|
||||
DEST := $(LIB_DST_DIR), \
|
||||
SRC := $(UCRT_DLL_DIR), \
|
||||
FILES := $(wildcard $(UCRT_DLL_DIR)/*.dll), \
|
||||
MACRO := copy-and-chmod, \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_UCRT_DLLS)
|
||||
endif
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# In jvm.cfg, the first listed KNOWN variant is the default. On most build
|
||||
# configurations, that is the server variant.
|
||||
ifeq ($(call And, $(call isTargetOs, windows) $(call isTargetCpu, x86)), true)
|
||||
DEFAULT_CFG_VARIANT ?= client
|
||||
endif
|
||||
DEFAULT_CFG_VARIANT ?= server
|
||||
|
||||
# Any variant other than server, client or minimal is represented as server in
|
||||
# the cfg file.
|
||||
VALID_CFG_VARIANTS := server client minimal
|
||||
CFG_VARIANTS := $(filter $(VALID_CFG_VARIANTS), $(JVM_VARIANTS)) \
|
||||
$(if $(filter-out $(VALID_CFG_VARIANTS), $(JVM_VARIANTS)), server)
|
||||
|
||||
# Change the order to put the default variant first if present.
|
||||
ORDERED_CFG_VARIANTS := \
|
||||
$(if $(filter $(DEFAULT_CFG_VARIANT), $(CFG_VARIANTS)), $(DEFAULT_CFG_VARIANT)) \
|
||||
$(filter-out $(DEFAULT_CFG_VARIANT), $(CFG_VARIANTS))
|
||||
|
||||
JVMCFG := $(LIB_DST_DIR)/jvm.cfg
|
||||
|
||||
define print-cfg-line
|
||||
$(call LogInfo, Adding -$1 $2 to jvm.cfg)
|
||||
$(PRINTF) -- "-$1 $2\n" >> $@ $(NEWLINE)
|
||||
endef
|
||||
|
||||
$(JVMCFG): $(call DependOnVariable, ORDERED_CFG_VARIANTS)
|
||||
$(call MakeTargetDir)
|
||||
$(RM) $@
|
||||
$(foreach v, $(ORDERED_CFG_VARIANTS), \
|
||||
$(call print-cfg-line,$v,KNOWN) \
|
||||
)
|
||||
# If either of server or client aren't present, add IGNORE lines for
|
||||
# them.
|
||||
$(foreach v, server client, \
|
||||
$(if $(filter $v, $(ORDERED_CFG_VARIANTS)), , \
|
||||
$(call print-cfg-line,$v,IGNORE) \
|
||||
) \
|
||||
)
|
||||
|
||||
TARGETS += $(JVMCFG)
|
||||
|
||||
################################################################################
|
||||
|
||||
POLICY_SRC := $(TOPDIR)/src/java.base/share/conf/security/java.policy
|
||||
POLICY_DST := $(CONF_DST_DIR)/security/java.policy
|
||||
|
||||
POLICY_SRC_LIST := $(POLICY_SRC)
|
||||
|
||||
$(POLICY_DST): $(POLICY_SRC_LIST)
|
||||
$(call MakeTargetDir)
|
||||
$(RM) $@ $@.tmp
|
||||
$(foreach f,$(POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;)
|
||||
$(MV) $@.tmp $@
|
||||
|
||||
TARGETS += $(POLICY_DST)
|
||||
|
||||
################################################################################
|
||||
|
||||
DEF_POLICY_SRC := $(TOPDIR)/src/java.base/share/lib/security/default.policy
|
||||
DEF_POLICY_DST := $(LIB_DST_DIR)/security/default.policy
|
||||
|
||||
DEF_POLICY_SRC_LIST := $(DEF_POLICY_SRC)
|
||||
DEF_POLICY_SRC_LIST += $(CUSTOM_POLICY_SRC_LIST)
|
||||
|
||||
ifeq ($(call isTargetOs, windows solaris), true)
|
||||
DEF_POLICY_SRC_LIST += $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/lib/security/default.policy
|
||||
endif
|
||||
|
||||
# Allow imported modules to modify the java.policy
|
||||
ifneq ($(IMPORT_MODULES_CONF), )
|
||||
DEF_POLICY_SRC_LIST += $(wildcard $(IMPORT_MODULES_CONF)/java.base/security/java.policy.extra)
|
||||
endif
|
||||
|
||||
$(DEF_POLICY_DST): $(DEF_POLICY_SRC_LIST)
|
||||
$(call MakeTargetDir)
|
||||
$(RM) $@ $@.tmp
|
||||
$(foreach f,$(DEF_POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;)
|
||||
$(MV) $@.tmp $@
|
||||
|
||||
TARGETS += $(DEF_POLICY_DST)
|
||||
|
||||
################################################################################
|
||||
|
||||
# CACERTS_FILE is optionally set in configure to override the default cacerts
|
||||
# which is otherwise generated in Gendata-java.base.gmk
|
||||
CACERTS_DST := $(LIB_DST_DIR)/security/cacerts
|
||||
|
||||
$(CACERTS_DST): $(CACERTS_FILE)
|
||||
$(call LogInfo, Copying $(patsubst $(OUTPUTDIR)/%, %, $@))
|
||||
$(call install-file)
|
||||
|
||||
ifneq ($(CACERTS_FILE), )
|
||||
TARGETS += $(CACERTS_DST)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_NET_PROPERTIES, \
|
||||
FILES := $(TOPDIR)/src/java.base/share/conf/net.properties, \
|
||||
DEST := $(CONF_DST_DIR), \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_NET_PROPERTIES)
|
||||
|
||||
ifeq ($(call isTargetOs, solaris linux), true)
|
||||
$(eval $(call SetupCopyFiles, COPY_SDP_CONF, \
|
||||
FILES := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/sdp/sdp.conf.template, \
|
||||
DEST := $(CONF_DST_DIR)/sdp, \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_SDP_CONF)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
# JDK license and assembly exception files to be packaged in JMOD
|
||||
|
||||
# The license files may not be present if the source has been obtained using a
|
||||
# different license.
|
||||
JDK_LICENSE ?= $(wildcard $(TOPDIR)/LICENSE)
|
||||
JDK_NOTICE ?= $(wildcard $(TOPDIR)/ASSEMBLY_EXCEPTION)
|
||||
JDK_ADDITIONAL_LICENSE_INFO ?= $(wildcard $(TOPDIR)/ADDITIONAL_LICENSE_INFO)
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_JDK_NOTICES, \
|
||||
FILES := $(JDK_LICENSE) $(JDK_NOTICE) $(JDK_ADDITIONAL_LICENSE_INFO), \
|
||||
DEST := $(COMMON_LEGAL_DST_DIR), \
|
||||
FLATTEN := true, \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_JDK_NOTICES)
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Copy and filter the legal files depending on what 3rd party components are
|
||||
# bundled or linked from the OS.
|
||||
#
|
||||
ifeq ($(USE_EXTERNAL_LIBZ), true)
|
||||
LEGAL_EXCLUDES += zlib.md
|
||||
endif
|
||||
|
||||
$(eval $(call SetupCopyLegalFiles, COPY_LEGAL, \
|
||||
EXCLUDES := $(LEGAL_EXCLUDES), \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_LEGAL)
|
||||
|
||||
################################################################################
|
||||
# Optionally copy libffi.so.? into the the image
|
||||
|
||||
ifeq ($(ENABLE_LIBFFI_BUNDLING), true)
|
||||
$(eval $(call SetupCopyFiles, COPY_LIBFFI, \
|
||||
FILES := $(LIBFFI_LIB_FILE), \
|
||||
DEST := $(call FindLibDirForModule, $(MODULE)), \
|
||||
FLATTEN := true, \
|
||||
MACRO := install-file-nolink, \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_LIBFFI)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Generate classfile_constants.h
|
||||
|
||||
$(eval $(call SetupTextFileProcessing, CREATE_CLASSFILE_CONSTANTS_H, \
|
||||
SOURCE_FILES := $(TOPDIR)/src/java.base/share/native/include/classfile_constants.h.template, \
|
||||
OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/modules_include/java.base/classfile_constants.h, \
|
||||
REPLACEMENTS := \
|
||||
@@VERSION_CLASSFILE_MAJOR@@ => $(VERSION_CLASSFILE_MAJOR) ; \
|
||||
@@VERSION_CLASSFILE_MINOR@@ => $(VERSION_CLASSFILE_MINOR) ; , \
|
||||
))
|
||||
|
||||
TARGETS += $(CREATE_CLASSFILE_CONSTANTS_H)
|
||||
|
||||
################################################################################
|
||||
82
make/copy/Copy-java.desktop.gmk
Normal file
82
make/copy/Copy-java.desktop.gmk
Normal file
@@ -0,0 +1,82 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2018, 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 CopyCommon.gmk
|
||||
include Modules.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, copy/Copy-java.desktop.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
$(CONF_DST_DIR)/sound.properties: $(TOPDIR)/src/java.desktop/share/conf/sound.properties
|
||||
$(call install-file)
|
||||
|
||||
TARGETS += $(CONF_DST_DIR)/sound.properties
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Copy property files from sun/print to LIB_DST_DIR
|
||||
#
|
||||
PSFONTPROPFILE_SRC_DIR := $(TOPDIR)/src/java.desktop/share/conf
|
||||
PSFONTPROPFILE_SRCS := $(wildcard $(PSFONTPROPFILE_SRC_DIR)/psfont*.properties*)
|
||||
PSFONTPROPFILE_TARGET_FILES := $(subst $(PSFONTPROPFILE_SRC_DIR),$(LIB_DST_DIR),$(PSFONTPROPFILE_SRCS))
|
||||
|
||||
$(LIB_DST_DIR)/%: $(PSFONTPROPFILE_SRC_DIR)/%
|
||||
$(call install-file)
|
||||
|
||||
TARGETS += $(PSFONTPROPFILE_TARGET_FILES)
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Copy and filter the legal files depending on what 3rd party components are
|
||||
# bundled or linked from the OS.
|
||||
#
|
||||
ifeq ($(USE_EXTERNAL_LIBJPEG), true)
|
||||
LEGAL_EXCLUDES += jpeg.md
|
||||
endif
|
||||
|
||||
ifeq ($(USE_EXTERNAL_LIBGIF), true)
|
||||
LEGAL_EXCLUDES += giflib.md
|
||||
endif
|
||||
|
||||
ifeq ($(USE_EXTERNAL_LIBPNG), true)
|
||||
LEGAL_EXCLUDES += libpng.md
|
||||
endif
|
||||
|
||||
ifeq ($(USE_EXTERNAL_LCMS), true)
|
||||
LEGAL_EXCLUDES += lcms.md
|
||||
endif
|
||||
|
||||
ifeq ($(FREETYPE_TO_USE), system)
|
||||
LEGAL_EXCLUDES += freetype.md
|
||||
endif
|
||||
|
||||
$(eval $(call SetupCopyLegalFiles, COPY_LEGAL, \
|
||||
EXCLUDES := $(LEGAL_EXCLUDES), \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_LEGAL)
|
||||
|
||||
################################################################################
|
||||
45
make/copy/Copy-jdk.crypto.cryptoki.gmk
Normal file
45
make/copy/Copy-jdk.crypto.cryptoki.gmk
Normal file
@@ -0,0 +1,45 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2019, 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 CopyCommon.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
ifeq ($(call isTargetOs, solaris), true)
|
||||
|
||||
SUNPKCS11_CFG_SRC := \
|
||||
$(TOPDIR)/src/jdk.crypto.cryptoki/solaris/conf/security/sunpkcs11-solaris.cfg
|
||||
SUNPKCS11_CFG_DST := $(CONF_DST_DIR)/security/sunpkcs11-solaris.cfg
|
||||
|
||||
$(SUNPKCS11_CFG_DST): $(SUNPKCS11_CFG_SRC)
|
||||
$(call install-file)
|
||||
|
||||
SECURITY_PKCS11_CONF_FILES += $(SUNPKCS11_CFG_DST)
|
||||
|
||||
TARGETS := $(SUNPKCS11_CFG_DST)
|
||||
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
42
make/copy/Copy-jdk.crypto.ucrypto.gmk
Normal file
42
make/copy/Copy-jdk.crypto.ucrypto.gmk
Normal file
@@ -0,0 +1,42 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2019, 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 CopyCommon.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
ifeq ($(call isTargetOs, solaris), true)
|
||||
|
||||
UCRYPTO_CFG_SRC := $(TOPDIR)/src/jdk.crypto.ucrypto/solaris/conf/security/ucrypto-solaris.cfg
|
||||
UCRYPTO_CFG_DST := $(CONF_DST_DIR)/security/ucrypto-solaris.cfg
|
||||
|
||||
$(UCRYPTO_CFG_DST): $(UCRYPTO_CFG_SRC)
|
||||
$(call install-file)
|
||||
|
||||
TARGETS += $(UCRYPTO_CFG_DST)
|
||||
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user