From 7fa7c419a0440578a258fef36934eecf903ddc9f Mon Sep 17 00:00:00 2001 From: Doug Simon Date: Tue, 15 Dec 2020 15:13:34 +0100 Subject: [PATCH 1/9] update to jvmci-21.0-b04 (cherry picked from commit c46e42400f210b43cd65054b8f2dd96ea86850db) --- common.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/common.json b/common.json index e46e80128470..efec08204eb3 100644 --- a/common.json +++ b/common.json @@ -2,20 +2,20 @@ "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+03-jvmci-21.0-b04", "platformspecific": true }, + "oraclejdk8": {"name": "oraclejdk", "version": "8u281+07-jvmci-21.0-b04", "platformspecific": true }, + "oraclejdk8Debug": {"name": "oraclejdk", "version": "8u281+07-jvmci-21.0-b04-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+5-jvmci-21.0-b04", "platformspecific": true }, + "labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.10+7-jvmci-21.0-b04", "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-b04", "platformspecific": true }, + "labsjdk-ce-15Debug": {"name": "labsjdk", "version": "ce-15.0.2+7-jvmci-21.0-b04-debug", "platformspecific": true }, + "labsjdk-ee-15": {"name": "labsjdk", "version": "ee-15.0.2+7-jvmci-21.0-b04", "platformspecific": true }, + "labsjdk-ee-15Debug": {"name": "labsjdk", "version": "ee-15.0.2+7-jvmci-21.0-b04-debug", "platformspecific": true } }, "sulong": { From 3bb8b153e6a2e8df1aefdd1109a45038681792ac Mon Sep 17 00:00:00 2001 From: Doug Simon Date: Tue, 15 Dec 2020 23:00:29 +0100 Subject: [PATCH 2/9] update and factor out Windows devkit definitions (cherry picked from commit 8a1acdfc1e5949bdfcded2e9a954a835c72e0bb0) --- common.hocon | 15 ++++----------- common.json | 7 +++++++ compiler/ci_common/gate_tasks.hocon | 8 ++++---- substratevm/ci_includes/gate.hocon | 3 +-- tools/ci.hocon | 5 +---- truffle/ci.hocon | 5 +---- vm/ci_common/common.hocon | 6 +++--- vm/ci_includes/vm.hocon | 6 ++++-- wasm/ci.jsonnet | 2 +- wasm/ci_common/common.jsonnet | 2 ++ 10 files changed, 28 insertions(+), 31 deletions(-) diff --git a/common.hocon b/common.hocon index 8b1076d69018..87783bea0a2b 100644 --- a/common.hocon +++ b/common.hocon @@ -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" } diff --git a/common.json b/common.json index efec08204eb3..931dc0a0fb5f 100644 --- a/common.json +++ b/common.json @@ -18,6 +18,13 @@ "labsjdk-ee-15Debug": {"name": "labsjdk", "version": "ee-15.0.2+7-jvmci-21.0-b04-debug", "platformspecific": true } }, + "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.16+1" : "==0" }}, + "windows-jdk15": { "packages" : { "devkit:VS2019-16.5.3+1" : "==0" }} + }, + "sulong": { "deps": { "linux": { diff --git a/compiler/ci_common/gate_tasks.hocon b/compiler/ci_common/gate_tasks.hocon index f06ef16fcbb1..058c13a2a930 100644 --- a/compiler/ci_common/gate_tasks.hocon +++ b/compiler/ci_common/gate_tasks.hocon @@ -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"} diff --git a/substratevm/ci_includes/gate.hocon b/substratevm/ci_includes/gate.hocon index c696297b414a..4b73649810ab 100644 --- a/substratevm/ci_includes/gate.hocon +++ b/substratevm/ci_includes/gate.hocon @@ -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"] @@ -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 diff --git a/tools/ci.hocon b/tools/ci.hocon index 93f6ce691508..225d90f2548e 100644 --- a/tools/ci.hocon +++ b/tools/ci.hocon @@ -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" }, diff --git a/truffle/ci.hocon b/truffle/ci.hocon index 45c78791786b..4cade005b908 100644 --- a/truffle/ci.hocon +++ b/truffle/ci.hocon @@ -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", }, diff --git a/vm/ci_common/common.hocon b/vm/ci_common/common.hocon index 86401e4ed51a..76b2e4e5ef31 100644 --- a/vm/ci_common/common.hocon +++ b/vm/ci_common/common.hocon @@ -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} } @@ -406,7 +406,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] @@ -426,7 +426,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] diff --git a/vm/ci_includes/vm.hocon b/vm/ci_includes/vm.hocon index dc58091e3141..ad127e5e2bde 100644 --- a/vm/ci_includes/vm.hocon +++ b/vm/ci_includes/vm.hocon @@ -26,6 +26,8 @@ vm_java_15Debug: ${labsjdk-ce-15Debug} { BASE_JDK_SHORT_VERSION: "15" } } +vm_common_windows_jdk8: ${svm-common-windows-openjdk8} + svm_suite: /substratevm vm_extra_suites: "truffleruby,graalpython,fastr,/wasm" vm_extra_suites_aarch64: "/wasm" @@ -156,14 +158,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"] diff --git a/wasm/ci.jsonnet b/wasm/ci.jsonnet index f5b47d3aceb8..8a69ae81d51d 100644 --- a/wasm/ci.jsonnet +++ b/wasm/ci.jsonnet @@ -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'}, diff --git a/wasm/ci_common/common.jsonnet b/wasm/ci_common/common.jsonnet index 05ac7fa996de..60d8a44476b0 100644 --- a/wasm/ci_common/common.jsonnet +++ b/wasm/ci_common/common.jsonnet @@ -9,6 +9,8 @@ local graal_suite_root = root_ci.graal_suite_root; local labsjdk8 = jdks.oraclejdk8, local labsjdk11 = jdks["labsjdk-ce-11"], + devkits: (import "../../common.json").devkits, + jdk8: { downloads+: { JAVA_HOME: labsjdk8, From 9eb8b9efe9b8904165eb5b2e3d00e08ad9c7747c Mon Sep 17 00:00:00 2001 From: Aleksandar Gradinac Date: Wed, 16 Dec 2020 13:56:02 +0100 Subject: [PATCH 3/9] Add new harfbuzz library to the native-image build (cherry picked from commit 4491509d56de2c3685b368d0b684b03cc86bbae3) --- .../src/com/oracle/svm/hosted/jdk/JNIRegistrationAwt.java | 1 + 1 file changed, 1 insertion(+) diff --git a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/jdk/JNIRegistrationAwt.java b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/jdk/JNIRegistrationAwt.java index 1df4985c2171..dd434171f8b5 100644 --- a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/jdk/JNIRegistrationAwt.java +++ b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/jdk/JNIRegistrationAwt.java @@ -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"); From f661918d922d19f50a3551793e8e3e5e1746f9b7 Mon Sep 17 00:00:00 2001 From: Doug Simon Date: Wed, 16 Dec 2020 22:06:51 +0100 Subject: [PATCH 4/9] update to mx 5.280.5 to get GR-16572 (cherry picked from commit cfcd5f3829e1f9ed870b356b9faef1d2fa63d10a) --- common.hocon | 2 +- graal-common.json | 9 +++++---- wasm/ci_common/common.jsonnet | 2 ++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/common.hocon b/common.hocon index 87783bea0a2b..c397a8c4b15b 100644 --- a/common.hocon +++ b/common.hocon @@ -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} } } diff --git a/graal-common.json b/graal-common.json index 97346a4582ca..27704c180b51 100644 --- a/graal-common.json +++ b/graal-common.json @@ -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": "d5989079763330598ccb0183468cac6c2e97b054" + }, + "mx_version" : "5.280.5" } diff --git a/wasm/ci_common/common.jsonnet b/wasm/ci_common/common.jsonnet index 60d8a44476b0..6a6123217c50 100644 --- a/wasm/ci_common/common.jsonnet +++ b/wasm/ci_common/common.jsonnet @@ -6,6 +6,7 @@ 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"], @@ -42,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', From 8666eb659ede1c4585dc80f4953eb26a12ca07da Mon Sep 17 00:00:00 2001 From: Doug Simon Date: Wed, 16 Dec 2020 23:02:53 +0100 Subject: [PATCH 5/9] updated MS Visual Studio version used for Native Images on Windows (cherry picked from commit 670e87572da1371faddf3b58cc27b3914cb151eb) --- common.json | 3 ++- substratevm/README.md | 13 +++---------- substratevm/SubstrateVM.md | 13 +++---------- .../svm/hosted/c/codegen/CCompilerInvoker.java | 16 +++++----------- 4 files changed, 13 insertions(+), 32 deletions(-) diff --git a/common.json b/common.json index 931dc0a0fb5f..53896ab0c664 100644 --- a/common.json +++ b/common.json @@ -18,10 +18,11 @@ "labsjdk-ee-15Debug": {"name": "labsjdk", "version": "ee-15.0.2+7-jvmci-21.0-b04-debug", "platformspecific": true } }, + "COMMENT" : "The devkits versions reflect those used to build the JVMCI JDKs (e.g., see devkit_platform_revisions in /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.16+1" : "==0" }}, + "windows-jdk11": { "packages" : { "devkit:VS2017-15.9.24+1" : "==0" }}, "windows-jdk15": { "packages" : { "devkit:VS2019-16.5.3+1" : "==0" }} }, diff --git a/substratevm/README.md b/substratevm/README.md index 612bbb0c0966..e184950eedb3 100644 --- a/substratevm/README.md +++ b/substratevm/README.md @@ -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 diff --git a/substratevm/SubstrateVM.md b/substratevm/SubstrateVM.md index d8bdfeac26a2..ba32cd5d9ebe 100644 --- a/substratevm/SubstrateVM.md +++ b/substratevm/SubstrateVM.md @@ -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 diff --git a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/codegen/CCompilerInvoker.java b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/codegen/CCompilerInvoker.java index 41adcef2c719..58ebdd0fe0a8 100644 --- a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/codegen/CCompilerInvoker.java +++ b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/codegen/CCompilerInvoker.java @@ -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; @@ -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)", From 0fd66a2985cadaaf0aa8d20ebe6e13f17b37b9b1 Mon Sep 17 00:00:00 2001 From: Gilles Duboscq Date: Mon, 21 Dec 2020 17:27:22 +0100 Subject: [PATCH 6/9] Fix DEVKIT_ROOT for node js build (cherry picked from commit 6485b9bf8eeeec19972fa5fec87b6cac524c1122) --- vm/ci_common/common.hocon | 17 ++++++++--------- vm/ci_includes/vm.hocon | 1 + 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/vm/ci_common/common.hocon b/vm/ci_common/common.hocon index 76b2e4e5ef31..98f4aeaaeb52 100644 --- a/vm/ci_common/common.hocon +++ b/vm/ci_common/common.hocon @@ -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 diff --git a/vm/ci_includes/vm.hocon b/vm/ci_includes/vm.hocon index ad127e5e2bde..c1f7b5b140ec 100644 --- a/vm/ci_includes/vm.hocon +++ b/vm/ci_includes/vm.hocon @@ -27,6 +27,7 @@ vm_java_15Debug: ${labsjdk-ce-15Debug} { } } 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" From 8828d351d38d2ed9229b88d74d1fc2987130f48d Mon Sep 17 00:00:00 2001 From: Doug Simon Date: Sun, 10 Jan 2021 12:53:37 +0100 Subject: [PATCH 7/9] update to jvmci-21.0-b05 (cherry picked from commit fd41177fabde344a4a168e1ff701a2518785f966) --- common.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/common.json b/common.json index 53896ab0c664..96a103deea35 100644 --- a/common.json +++ b/common.json @@ -2,20 +2,20 @@ "README": "This file contains definitions that are useful for the hocon and jsonnet CI files of multiple repositories.", "jdks": { - "openjdk8": {"name": "openjdk", "version": "8u282+03-jvmci-21.0-b04", "platformspecific": true }, - "oraclejdk8": {"name": "oraclejdk", "version": "8u281+07-jvmci-21.0-b04", "platformspecific": true }, - "oraclejdk8Debug": {"name": "oraclejdk", "version": "8u281+07-jvmci-21.0-b04-fastdebug", "platformspecific": true }, + "openjdk8": {"name": "openjdk", "version": "8u282+07-jvmci-21.0-b05", "platformspecific": true }, + "oraclejdk8": {"name": "oraclejdk", "version": "8u281+09-jvmci-21.0-b05", "platformspecific": true }, + "oraclejdk8Debug": {"name": "oraclejdk", "version": "8u281+09-jvmci-21.0-b05-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.10+5-jvmci-21.0-b04", "platformspecific": true }, - "labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.10+7-jvmci-21.0-b04", "platformspecific": true }, + "labsjdk-ce-11": {"name": "labsjdk", "version": "ce-11.0.10+8-jvmci-21.0-b05", "platformspecific": true }, + "labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.10+8-jvmci-21.0-b05", "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-b04", "platformspecific": true }, - "labsjdk-ce-15Debug": {"name": "labsjdk", "version": "ce-15.0.2+7-jvmci-21.0-b04-debug", "platformspecific": true }, - "labsjdk-ee-15": {"name": "labsjdk", "version": "ee-15.0.2+7-jvmci-21.0-b04", "platformspecific": true }, - "labsjdk-ee-15Debug": {"name": "labsjdk", "version": "ee-15.0.2+7-jvmci-21.0-b04-debug", "platformspecific": true } + "labsjdk-ce-15": {"name": "labsjdk", "version": "ce-15.0.1+9-jvmci-21.0-b05", "platformspecific": true }, + "labsjdk-ce-15Debug": {"name": "labsjdk", "version": "ce-15.0.1+9-jvmci-21.0-b05-debug", "platformspecific": true }, + "labsjdk-ee-15": {"name": "labsjdk", "version": "ee-15.0.2+7-jvmci-21.0-b05", "platformspecific": true }, + "labsjdk-ee-15Debug": {"name": "labsjdk", "version": "ee-15.0.2+7-jvmci-21.0-b05-debug", "platformspecific": true } }, "COMMENT" : "The devkits versions reflect those used to build the JVMCI JDKs (e.g., see devkit_platform_revisions in /make/conf/jib-profiles.js)", From 08dd7dfc28ab752f62bf0cd51599d3068144f42e Mon Sep 17 00:00:00 2001 From: Marouane El Hallaoui Date: Fri, 15 Jan 2021 14:08:44 +0100 Subject: [PATCH 8/9] Update to jvmci-21.0-b06 (cherry picked from commit 37b618bd0f1048fd89e0d91dd83d4397669598d6) --- common.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/common.json b/common.json index 96a103deea35..82d2ab0f24d3 100644 --- a/common.json +++ b/common.json @@ -2,20 +2,20 @@ "README": "This file contains definitions that are useful for the hocon and jsonnet CI files of multiple repositories.", "jdks": { - "openjdk8": {"name": "openjdk", "version": "8u282+07-jvmci-21.0-b05", "platformspecific": true }, - "oraclejdk8": {"name": "oraclejdk", "version": "8u281+09-jvmci-21.0-b05", "platformspecific": true }, - "oraclejdk8Debug": {"name": "oraclejdk", "version": "8u281+09-jvmci-21.0-b05-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.10+8-jvmci-21.0-b05", "platformspecific": true }, - "labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.10+8-jvmci-21.0-b05", "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-b05", "platformspecific": true }, - "labsjdk-ce-15Debug": {"name": "labsjdk", "version": "ce-15.0.1+9-jvmci-21.0-b05-debug", "platformspecific": true }, - "labsjdk-ee-15": {"name": "labsjdk", "version": "ee-15.0.2+7-jvmci-21.0-b05", "platformspecific": true }, - "labsjdk-ee-15Debug": {"name": "labsjdk", "version": "ee-15.0.2+7-jvmci-21.0-b05-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 /make/conf/jib-profiles.js)", From f0245ba31184e77ebae417801eef20793cd72dec Mon Sep 17 00:00:00 2001 From: Danilo Ansaloni Date: Thu, 21 Jan 2021 20:07:29 +0100 Subject: [PATCH 9/9] Undo changes to overlay and mx versions. --- graal-common.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graal-common.json b/graal-common.json index 27704c180b51..5931ac112072 100644 --- a/graal-common.json +++ b/graal-common.json @@ -2,7 +2,7 @@ "README": "This file contains definitions that are useful for the hocon and jsonnet CI files of the graal and graal-enterprise repositories.", "ci": { - "overlay": "d5989079763330598ccb0183468cac6c2e97b054" + "overlay": "f60bb0b6b5d9fb8a5ec73f6c01d63d2a8d8003db" }, - "mx_version" : "5.280.5" + "mx_version" : "HEAD" }