Skip to content

Commit

Permalink
[GR-28910] Update the JDKs used by graal builders.
Browse files Browse the repository at this point in the history
PullRequest: graal/8100
  • Loading branch information
ansalond committed Jan 22, 2021
2 parents 8384708 + f0245ba commit cb492e6
Show file tree
Hide file tree
Showing 15 changed files with 67 additions and 85 deletions.
17 changes: 5 additions & 12 deletions common.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ overlay = ${ci.overlay}
# to another branch/commit in a Graal PR when mx changes are required for the PR.
mx : {
packages : {
mx: "HEAD"
mx: ${mx_version}
}
}

Expand Down Expand Up @@ -208,26 +208,19 @@ svm-common-darwin: ${svm-common} ${darwin-amd64} {
timelimit: "45:00"
}

svm-common-windows: ${svm-common} ${windows-amd64} {
svm-common-windows-openjdk8: ${svm-common} ${windows-amd64} ${devkits.windows-openjdk8} {
packages : {
msvc : "==10.0"
}
timelimit: "45:00"
}

windows-devkit-jdk11: {
svm-common-windows-oraclejdk8: ${svm-common} ${windows-amd64} ${devkits.windows-oraclejdk8} {
packages : {
"devkit:VS2017-15.9.16+1" : "==0"
}
}

windows-devkit-jdk15: {
packages : {
"devkit:VS2019-16.5.3+1" : "==0"
}
timelimit: "45:00"
}

svm-common-windows-jdk11: ${svm-common} ${windows-amd64} ${windows-devkit-jdk11} {
svm-common-windows-jdk11: ${svm-common} ${windows-amd64} ${devkits.windows-jdk11} {
timelimit: "45:00"
}

Expand Down
26 changes: 17 additions & 9 deletions common.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,28 @@
"README": "This file contains definitions that are useful for the hocon and jsonnet CI files of multiple repositories.",

"jdks": {
"openjdk8": {"name": "openjdk", "version": "8u272+10-jvmci-21.0-b03", "platformspecific": true },
"oraclejdk8": {"name": "oraclejdk", "version": "8u271+09-jvmci-21.0-b03", "platformspecific": true },
"oraclejdk8Debug": {"name": "oraclejdk", "version": "8u271+09-jvmci-21.0-b03-fastdebug", "platformspecific": true },
"openjdk8": {"name": "openjdk", "version": "8u282+07-jvmci-21.0-b06", "platformspecific": true },
"oraclejdk8": {"name": "oraclejdk", "version": "8u281+09-jvmci-21.0-b06", "platformspecific": true },
"oraclejdk8Debug": {"name": "oraclejdk", "version": "8u281+09-jvmci-21.0-b06-fastdebug", "platformspecific": true },

"openjdk11": {"name": "openjdk", "version": "11.0.3+7", "platformspecific": true },
"oraclejdk11": {"name": "oraclejdk", "version": "11.0.6+8", "platformspecific": true },
"labsjdk-ce-11": {"name": "labsjdk", "version": "ce-11.0.9+10-jvmci-21.0-b03", "platformspecific": true },
"labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.9+7-jvmci-21.0-b03", "platformspecific": true },
"labsjdk-ce-11": {"name": "labsjdk", "version": "ce-11.0.10+8-jvmci-21.0-b06", "platformspecific": true },
"labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.10+8-jvmci-21.0-b06", "platformspecific": true },

"oraclejdk15": {"name": "oraclejdk", "version": "15.0.1+6", "platformspecific": true },
"labsjdk-ce-15": {"name": "labsjdk", "version": "ce-15.0.1+9-jvmci-21.0-b03", "platformspecific": true },
"labsjdk-ce-15Debug": {"name": "labsjdk", "version": "ce-15.0.1+9-jvmci-21.0-b03-debug", "platformspecific": true },
"labsjdk-ee-15": {"name": "labsjdk", "version": "ee-15.0.1+9-jvmci-21.0-b03", "platformspecific": true },
"labsjdk-ee-15Debug": {"name": "labsjdk", "version": "ee-15.0.1+9-jvmci-21.0-b03-debug", "platformspecific": true }
"labsjdk-ce-15": {"name": "labsjdk", "version": "ce-15.0.1+9-jvmci-21.0-b06", "platformspecific": true },
"labsjdk-ce-15Debug": {"name": "labsjdk", "version": "ce-15.0.1+9-jvmci-21.0-b06-debug", "platformspecific": true },
"labsjdk-ee-15": {"name": "labsjdk", "version": "ee-15.0.2+7-jvmci-21.0-b06", "platformspecific": true },
"labsjdk-ee-15Debug": {"name": "labsjdk", "version": "ee-15.0.2+7-jvmci-21.0-b06-debug", "platformspecific": true }
},

"COMMENT" : "The devkits versions reflect those used to build the JVMCI JDKs (e.g., see devkit_platform_revisions in <jdk>/make/conf/jib-profiles.js)",
"devkits": {
"windows-oraclejdk8": { "packages" : { "devkit:VS2017-15.9.16+1" : "==0" }},
"windows-openjdk8": { "packages" : { "devkit:VS2017-15.5.5+1" : "==0" }},
"windows-jdk11": { "packages" : { "devkit:VS2017-15.9.24+1" : "==0" }},
"windows-jdk15": { "packages" : { "devkit:VS2019-16.5.3+1" : "==0" }}
},

"sulong": {
Expand Down
8 changes: 4 additions & 4 deletions compiler/ci_common/gate_tasks.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ builds += [
# ${gateTestBenchmark} ${oraclejdk8} ${gateDarwinAMD64} {name: "weekly-test-compiler-benchmarktest-8-darwin-amd64"} ${graalWeekly}

# Windows AMD64
${gateTest} ${oraclejdk8} ${gateWindowsAMD64} {name: "gate-compiler-test-8-windows-amd64", timelimit: "50:00", packages: {msvc: "==10.0" }}
# GR-25369 ${gateTest} ${labsjdk-ee-15} ${gateWindowsAMD64} {name: "gate-compiler-test-15-windows-amd64", timelimit: "50:00"} ${windows-devkit-jdk15}
${gateTest} ${gateWindowsAMD64} {name: "daily-compiler-test-15-windows-amd64"} ${windows-devkit-jdk15} ${dailyJDK15Debug}
${gateTest} ${oraclejdk8} ${gateWindowsAMD64} {name: "gate-compiler-test-8-windows-amd64", timelimit: "50:00"} ${devkits.windows-oraclejdk8}
# GR-25369 ${gateTest} ${labsjdk-ee-15} ${gateWindowsAMD64} {name: "gate-compiler-test-15-windows-amd64", timelimit: "50:00"} ${devkits.windows-jdk15}
${gateTest} ${gateWindowsAMD64} {name: "daily-compiler-test-15-windows-amd64"} ${devkits.windows-jdk15} ${dailyJDK15Debug}
# GR-20001
# ${gateTest} ${labsjdk-ee-11} ${gateWindowsAMD64} {name: "gate-compiler-test-labsjdk-ee-11-windows-amd64", timelimit: "50:00"} ${windows-devkit-jdk11}
# ${gateTest} ${labsjdk-ee-11} ${gateWindowsAMD64} {name: "gate-compiler-test-labsjdk-ee-11-windows-amd64", timelimit: "50:00"} ${devkits.windows-jdk11}

# Linux AMD64
${gateTest} ${oraclejdk8} ${gateLinuxAMD64} {name: "gate-compiler-test-8-linux-amd64", timelimit: "35:00"}
Expand Down
9 changes: 5 additions & 4 deletions graal-common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"README": "This file contains definitions that are useful for the hocon and jsonnet CI files of the graal and graal-enterprise repositories.",
"README": "This file contains definitions that are useful for the hocon and jsonnet CI files of the graal and graal-enterprise repositories.",

"ci": {
"overlay": "f60bb0b6b5d9fb8a5ec73f6c01d63d2a8d8003db"
}
"ci": {
"overlay": "f60bb0b6b5d9fb8a5ec73f6c01d63d2a8d8003db"
},
"mx_version" : "HEAD"
}
13 changes: 3 additions & 10 deletions substratevm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,10 @@ xcode-select --install
```

#### Prerequisites for Using Native Image on Windows
To make use of Native Image on Windows, follow the further recommendations. The
required Microsoft Visual C++ (MSVC) version depends on the JDK version that
GraalVM is based on. For GraalVM distribution based on JDK 8, you will need MSVC
2010 SP1 version. The recommended installation method is using Microsoft Windows
SDK 7.1:
1. Download the SDK file `GRMSDKX_EN_DVD.iso` for from [Microsoft](https://www.microsoft.com/en-gb/download).
2. Mount the image by opening `F:\Setup\SDKSetup.exe` directly.
Building native images on Windows requires a Microsoft Visual C++ (MSVC) that comes with Visual Studio 2017 15.5.5 or later.

For GraalVM distribution based on JDK 11, you will need MSVC 2017 15.5.5 or later version.

The last prerequisite, common for both GraalVM distribution based on JDK 11 and JDK 8, is the proper [Developer Command Prompt](https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2019#developer_command_prompt_shortcuts) for your version of [Visual Studio](https://visualstudio.microsoft.com/vs/). On Windows the `native-image` tool only works when it is executed from the **x64 Native Tools Command Prompt**.
In addition, a proper [Developer Command Prompt](https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2019#developer_command_prompt_shortcuts) for your version of [Visual Studio](https://visualstudio.microsoft.com/vs/).
On Windows the `native-image` tool only works when it is executed from the **x64 Native Tools Command Prompt**.

## Build a Native Image

Expand Down
13 changes: 3 additions & 10 deletions substratevm/SubstrateVM.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,9 @@ For compilation, `native-image` depends on the local toolchain. Install
`gcc`, using a package manager available on your OS. Some Linux distributions
may additionally require `libstdc++-static`.

Unlike Linux or macOS platforms, building native images on Windows requires meeting certain prerequisites.
The required Microsoft Visual C++ (MSVC) version depends on the JDK version that
GraalVM is based on. For GraalVM distribution based on JDK 8, you will need MSVC
2010 SP1 version. The recommended installation method is using Microsoft Windows
SDK 7.1:
1. Download the SDK file `GRMSDKX_EN_DVD.iso` from [Microsoft](https://www.microsoft.com/en-gb/download).
2. Mount the image by opening `F:\Setup\SDKSetup.exe` directly.
For GraalVM distribution based on JDK 11, you will need MSVC 2017 15.5.5 or later version.

The last prerequisite, common for both GraalVM distribution based on JDK 11 and JDK 8, is the proper [Developer Command Prompt](https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2019#developer_command_prompt_shortcuts) for your version of [Visual Studio](https://visualstudio.microsoft.com/vs/). On Windows, the `native-image` tool only works when it is executed from the x64 Native Tools Command Prompt.
Building native images on Windows requires a Microsoft Visual C++ (MSVC) that comes with Visual Studio 2017 15.5.5 or later.
In addition, a proper [Developer Command Prompt](https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2019#developer_command_prompt_shortcuts) for your version of [Visual Studio](https://visualstudio.microsoft.com/vs/).
On Windows, the `native-image` tool only works when it is executed from the x64 Native Tools Command Prompt.

```shell
cd substratevm
Expand Down
3 changes: 1 addition & 2 deletions substratevm/ci_includes/gate.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ svm-common-gate: {

svm-common-linux-gate: ${svm-common-linux-amd64} ${svm-common-gate}
svm-common-darwin-gate: ${svm-common-darwin} ${svm-common-gate}
svm-common-windows-gate: ${svm-common-windows} ${svm-common-gate}

svm-cmd-gate: ["mx", "--kill-with-sigquit", "--strict-compliance", "gate", "--strict-mode", "--tags"]

Expand Down Expand Up @@ -54,7 +53,7 @@ builds += [
${svm-cmd-gate} ["style,fullbuild,helloworld,test,svmjunit,maven"]
]
}
${oraclejdk8} ${svm-common-windows-gate} {
${oraclejdk8} ${svm-common-gate} ${svm-common-windows-oraclejdk8} {
name: "gate-svm-windows-basics"
environment: {
PATH : "$MVN_HOME;$PATH" # workaround until GR-10735 is resolved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import com.oracle.svm.core.option.SubstrateOptionsParser;
import com.oracle.svm.core.util.InterruptImageBuilding;
import com.oracle.svm.core.util.UserError;
import com.oracle.svm.core.util.VMError;
import com.oracle.svm.hosted.c.util.FileUtils;

import jdk.vm.ci.aarch64.AArch64;
Expand Down Expand Up @@ -175,16 +174,11 @@ protected CompilerInfo createCompilerInfo(Path compilerPath, Scanner outerScanne

@Override
protected void verify() {
if (JavaVersionUtil.JAVA_SPEC >= 11) {
if (compilerInfo.versionMajor < 19) {
UserError.abort("Java %d native-image building on Windows requires Visual Studio 2015 version 14.0 or later (C/C++ Optimizing Compiler Version 19.* or later)",
JavaVersionUtil.JAVA_SPEC);
}
} else {
VMError.guarantee(JavaVersionUtil.JAVA_SPEC == 8, "Native-image building is only supported for Java 8 and Java 11 or later");
if (compilerInfo.versionMajor != 16 || compilerInfo.versionMinor0 != 0) {
UserError.abort("Java 8 native-image building on Windows requires Microsoft Windows SDK 7.1");
}
// See details on _MSC_VER at https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B
// The constraint of `_MSC_VER >= 1912` reflects the version used for building OpenJDK8.
if (compilerInfo.versionMajor < 19 || compilerInfo.versionMinor0 < 12) {
UserError.abort("Java %d native-image building on Windows requires Visual Studio 2017 version 15.5 or later (C/C++ Optimizing Compiler Version 19.12 or later).%nCompiler info detected: %s",
JavaVersionUtil.JAVA_SPEC, compilerInfo);
}
if (guessArchitecture(compilerInfo.targetArch) != AMD64.class) {
UserError.abort("Native-image building on Windows currently only supports target architecture: %s (%s unsupported)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ private static void registerFreeType(DuringAnalysisAccess access) {

NativeLibrarySupport.singleton().preregisterUninitializedBuiltinLibrary("fontmanager");
nativeLibraries.addStaticJniLibrary("fontmanager", isHeadless() ? "awt_headless" : "awt_xawt");
nativeLibraries.addStaticJniLibrary("harfbuzz");

PlatformNativeLibrarySupport.singleton().addBuiltinPkgNativePrefix("sun_font");

Expand Down
5 changes: 1 addition & 4 deletions tools/ci.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ builds += [
targets : [gate],
name: "gate-tools-javadoc"
},
${windows-amd64} ${oraclejdk8} ${toolsGateLite} {
packages : {
msvc : "==10.0"
},
${windows-amd64} ${oraclejdk8} ${toolsGateLite} ${devkits.windows-oraclejdk8} {
targets : [gate],
name: "gate-tools-windows-8"
},
Expand Down
5 changes: 1 addition & 4 deletions truffle/ci.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,13 @@ builds += [
${darwin-amd64} ${oraclejdk11} ${gateLite} ${truffleWeekly} {
name: "gate-truffle-mac-lite-oraclejdk-11"
},
${windows-amd64} ${oraclejdk8} ${truffleCommon} {
${windows-amd64} ${oraclejdk8} ${truffleCommon} ${devkits.windows-oraclejdk8} {
# TODO make that a full gate run
# currently, some truffle unittests fail on windows
run : [
["mx", "build" ],
["mx", "unittest", "--verbose" ]
]
packages : {
msvc : "==10.0"
}
targets : [gate],
name: "gate-truffle-nfi-windows-8",
},
Expand Down
23 changes: 11 additions & 12 deletions vm/ci_common/common.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ common_vm_windows: ${common_vm} ${windows} {
}
}

common_vm_windows-jdk11: ${common_vm} ${windows} ${windows-devkit-jdk11} {
common_vm_windows-jdk11: ${common_vm} ${windows} ${devkits.windows-jdk11} {
downloads : {
MAVEN_HOME: {name: maven, version: "3.3.9", platformspecific: false}
}
Expand All @@ -47,21 +47,20 @@ js_windows_common: {
downloads: {
NASM: {name: nasm, version: "2.14.02", platformspecific: true}
}
setup: [
["set-export", "DEVKIT_ROOT", "$VS2017_15_9_16_1_0_ROOT"]
["set-export", "DEVKIT_VERSION", "2017"]
]
}

js_windows_jdk11: ${common_vm_windows-jdk11} ${js_windows_common} {
setup: ${common_vm_windows-jdk11.setup} ${js_windows_common.setup}
setup: ${common_vm_windows-jdk11.setup} [
["set-export", "DEVKIT_ROOT", "$VS2017_15_9_24_1_0_ROOT"]
["set-export", "DEVKIT_VERSION", "2017"]
]
}

js_windows: ${common_vm_windows} ${js_windows_common} {
packages: {
"devkit:VS2017-15.9.16+1" : "==0"
}
setup: ${common_vm_windows.setup} ${js_windows_common.setup}
setup: ${common_vm_windows.setup} [
["set-export", "DEVKIT_ROOT", ${vm_windows_jdk8_devkit_var}]
["set-export", "DEVKIT_VERSION", "2017"]
]
}

# SULONG
Expand Down Expand Up @@ -406,7 +405,7 @@ builds += [
name: deploy-vm-installable-java11-darwin-amd64
}
# Windows/AMD64
${vm_java_8} ${deploy_daily_vm_windows} ${js_windows} ${svm-common-windows} {
${vm_java_8} ${deploy_daily_vm_windows} ${js_windows} ${vm_common_windows_jdk8} {
run: [
[set-export, VM_ENV, "${VM_ENV}-win"]
${mx_vm_common} [build]
Expand All @@ -426,7 +425,7 @@ builds += [
timelimit: "1:30:00"
name: deploy-vm-base-java11-windows-amd64
}
${vm_java_8} ${deploy_daily_vm_windows} ${js_windows} ${svm-common-windows} {
${vm_java_8} ${deploy_daily_vm_windows} ${js_windows} ${vm_common_windows_jdk8} {
run: [
[set-export, VM_ENV, "${VM_ENV}-win"]
${mx_vm_installables} [--dynamicimports, ${vm_extra_suites_windows}, "--exclude-components="${non-product-vm-components-windows}, build]
Expand Down
7 changes: 5 additions & 2 deletions vm/ci_includes/vm.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ vm_java_15Debug: ${labsjdk-ce-15Debug} {
BASE_JDK_SHORT_VERSION: "15"
}
}
vm_common_windows_jdk8: ${svm-common-windows-openjdk8}
vm_windows_jdk8_devkit_var: "$VS2017_15_5_5_1_0_ROOT"

svm_suite: /substratevm
vm_extra_suites: "truffleruby,graalpython,fastr,/wasm"
vm_extra_suites_aarch64: "/wasm"
Expand Down Expand Up @@ -156,14 +159,14 @@ builds += [
]
name: deploy-vm-maven-darwin-amd64
}
${deploy_daily_vm_windows} ${svm-common-windows} ${maven_base_8_native} {
${deploy_daily_vm_windows} ${vm_common_windows_jdk8} ${maven_base_8_native} {
run: [
${maven_base_8_native.build}
${maven_base_8_native.deploy} [--dry-run, "lafo-maven"]
]
name: gate-vm-maven-dry-run-windows-amd64
}
${deploy_daily_vm_windows} ${svm-common-windows} ${maven_base_8_native} {
${deploy_daily_vm_windows} ${vm_common_windows_jdk8} ${maven_base_8_native} {
run: [
${maven_base_8_native.build}
${maven_base_8_native.deploy} ["lafo-maven"]
Expand Down
2 changes: 1 addition & 1 deletion wasm/ci.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
common.jdk8_gate_linux_wabt + common.gate_graalwasm_jvmci + common.amd64 + {environment+: {GATE_TAGS: 'build,wasmtest'}} + {name: 'gate-graalwasm-unittest-linux-amd64'},
common.jdk8_gate_linux_wabt_emsdk + common.gate_graalwasm_emsdk_jvmci + common.amd64 + {environment+: {GATE_TAGS: 'buildall,wasmextratest'}} + {name: 'gate-graalwasm-extra-unittest-linux-amd64'},
common.jdk8_gate_linux_wabt_emsdk + common.gate_graalwasm_emsdk_jvmci + common.amd64 + {environment+: {GATE_TAGS: 'buildall,wasmbenchtest'}} + {name: 'gate-graalwasm-benchtest-linux-amd64'},
common.jdk8_gate_windows_wabt + common.gate_graalwasm_jvmci + common.amd64 + {environment+: {GATE_TAGS: 'build,wasmtest'}} + {name: 'gate-graalwasm-unittest-windows-amd64', packages: {msvc: '==10.0'}},
common.jdk8_gate_windows_wabt + common.gate_graalwasm_jvmci + common.amd64 + {environment+: {GATE_TAGS: 'build,wasmtest'}} + {name: 'gate-graalwasm-unittest-windows-amd64'} + common.devkits["windows-oraclejdk8"],

common.jdk11_gate_linux_wabt + common.gate_graalwasm_jvmci + common.aarch64 + {environment+: {GATE_TAGS: 'build,wasmtest'}} + {name: 'gate-graalwasm-unittest-11-linux-aarch64'},

Expand Down
4 changes: 4 additions & 0 deletions wasm/ci_common/common.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ local graal_suite_root = root_ci.graal_suite_root;

{
local jdks = (import "../../common.json").jdks,
local mx = (import "../../graal-common.json").mx_version,
local labsjdk8 = jdks.oraclejdk8,
local labsjdk11 = jdks["labsjdk-ce-11"],

devkits: (import "../../common.json").devkits,

jdk8: {
downloads+: {
JAVA_HOME: labsjdk8,
Expand Down Expand Up @@ -40,6 +43,7 @@ local graal_suite_root = root_ci.graal_suite_root;
MX_PYTHON: 'python3',
},
packages+: {
'mx': mx,
'00:pip:logilab-common': '==1.4.4',
'pip:pylint': '==1.9.3',
'pip:ninja_syntax': '==1.7.2',
Expand Down

0 comments on commit cb492e6

Please sign in to comment.