Skip to content

Commit

Permalink
Merge pull request #31 from adamfarley/do_not_use_dtrace_auto_when_bu…
Browse files Browse the repository at this point in the history
…ilding_jdk15_or_up

Removing auto setting for dtrace config option on jdk15+
  • Loading branch information
Shelley Lambert authored May 11, 2021
2 parents 30e345e + 326bb4f commit 1e8f66c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
17 changes: 14 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3349,20 +3349,29 @@ function buildJDK(javaToBuild, impl, usePRRef) {
let configureArgs;
const fileName = `Open${javaToBuild.toUpperCase()}-jdk_x64_${targetOs}_${impl}_${time}`;
let fullFileName = `${fileName}.tar.gz`;
let skipFreetype = "";
if (`${targetOs}` === 'mac') {
configureArgs = "--disable-warnings-as-errors --with-extra-cxxflags='-stdlib=libc++ -mmacosx-version-min=10.8'";
}
else if (`${targetOs}` === 'linux') {
skipFreetype = "--skip-freetype";
if (`${impl}` === 'hotspot') {
configureArgs = '--disable-ccache --enable-dtrace=auto --disable-warnings-as-errors';
configureArgs = '--disable-ccache --disable-warnings-as-errors';
}
else {
configureArgs = '--disable-ccache --enable-jitserver --enable-dtrace=auto --disable-warnings-as-errors --with-openssl=/usr/local/openssl-1.0.2 --enable-cuda --with-cuda=/usr/local/cuda-9.0';
configureArgs = '--disable-ccache --enable-jitserver --disable-warnings-as-errors --with-openssl=/usr/local/openssl-1.0.2 --enable-cuda --with-cuda=/usr/local/cuda-9.0';
}
// If current JDK version is greater than (or equal to) 15, "auto" is no longer a valid value for the enable-dtrace config parameter.
if ((parseInt(getBootJdkVersion(javaToBuild)) + 1) >= 15) {
configureArgs = configureArgs + ' --enable-dtrace';
}
else {
configureArgs = configureArgs + ' --enable-dtrace=auto';
}
}
else {
if (`${impl}` === 'hotspot') {
configureArgs = "--disable-ccache --enable-dtrace=auto --disable-warnings-as-errors";
configureArgs = "--disable-ccache --disable-warnings-as-errors";
}
else {
configureArgs = "--with-freemarker-jar='c:/freemarker.jar' --with-openssl='c:/OpenSSL-1.1.1g-x86_64-VS2017' --enable-openssl-bundling --enable-cuda -with-cuda='C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.0'";
Expand All @@ -3371,6 +3380,7 @@ function buildJDK(javaToBuild, impl, usePRRef) {
}
yield exec.exec(`bash ./makejdk-any-platform.sh \
-J "${jdkBootDir}" \
skipFreetype \
--configure-args "${configureArgs}" \
-d artifacts \
--target-file-name ${fullFileName} \
Expand Down Expand Up @@ -3495,6 +3505,7 @@ function installLinuxDepends(javaToBuild, impl) {
libxt-dev \
libxtst-dev \
make \
systemtap-sdt-dev \
libnuma-dev \
gcc-multilib \
pkg-config');
Expand Down
18 changes: 15 additions & 3 deletions src/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,27 @@ export async function buildJDK(
let configureArgs
const fileName = `Open${javaToBuild.toUpperCase()}-jdk_x64_${targetOs}_${impl}_${time}`
let fullFileName = `${fileName}.tar.gz`
let skipFreetype = ""
if (`${targetOs}` === 'mac') {
configureArgs = "--disable-warnings-as-errors --with-extra-cxxflags='-stdlib=libc++ -mmacosx-version-min=10.8'"
} else if (`${targetOs}` === 'linux') {
skipFreetype = "--skip-freetype"

if (`${impl}` === 'hotspot') {
configureArgs = '--disable-ccache --enable-dtrace=auto --disable-warnings-as-errors'
configureArgs = '--disable-ccache --disable-warnings-as-errors'
} else {
configureArgs = '--disable-ccache --enable-jitserver --disable-warnings-as-errors --with-openssl=/usr/local/openssl-1.0.2 --enable-cuda --with-cuda=/usr/local/cuda-9.0'
}

// If current JDK version is greater than (or equal to) 15, "auto" is no longer a valid value for the enable-dtrace config parameter.
if ((parseInt(getBootJdkVersion(javaToBuild)) + 1) >= 15) {
configureArgs = configureArgs + ' --enable-dtrace'
} else {
configureArgs = '--disable-ccache --enable-jitserver --enable-dtrace=auto --disable-warnings-as-errors --with-openssl=/usr/local/openssl-1.0.2 --enable-cuda --with-cuda=/usr/local/cuda-9.0'
configureArgs = configureArgs + ' --enable-dtrace=auto'
}
} else {
if (`${impl}` === 'hotspot') {
configureArgs = "--disable-ccache --enable-dtrace=auto --disable-warnings-as-errors"
configureArgs = "--disable-ccache --disable-warnings-as-errors"
} else {
configureArgs = "--with-freemarker-jar='c:/freemarker.jar' --with-openssl='c:/OpenSSL-1.1.1g-x86_64-VS2017' --enable-openssl-bundling --enable-cuda -with-cuda='C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.0'"
}
Expand All @@ -86,6 +96,7 @@ export async function buildJDK(

await exec.exec(`bash ./makejdk-any-platform.sh \
-J "${jdkBootDir}" \
skipFreetype \
--configure-args "${configureArgs}" \
-d artifacts \
--target-file-name ${fullFileName} \
Expand Down Expand Up @@ -209,6 +220,7 @@ async function installLinuxDepends(javaToBuild: string, impl: string): Promise<v
libxt-dev \
libxtst-dev \
make \
systemtap-sdt-dev \
libnuma-dev \
gcc-multilib \
pkg-config'
Expand Down

0 comments on commit 1e8f66c

Please sign in to comment.