Skip to content

Commit 6fa5281

Browse files
committed
8283723: Update Visual Studio 2022 to version 17.1.0 for Oracle builds on Windows
Reviewed-by: mbaesken Backport-of: a9a9b901b4b340dc573ace72d64edcb0a1b8ef94
1 parent 25ad9d6 commit 6fa5281

File tree

4 files changed

+39
-14
lines changed

4 files changed

+39
-14
lines changed

doc/building.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ <h2 id="native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requ
278278
</tr>
279279
<tr class="odd">
280280
<td style="text-align: left;">Windows</td>
281-
<td style="text-align: left;">Microsoft Visual Studio 2019 update 16.7.2</td>
281+
<td style="text-align: left;">Microsoft Visual Studio 2022 update 17.1.0</td>
282282
</tr>
283283
</tbody>
284284
</table>

doc/building.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ issues.
323323
------------------ -------------------------------------------------------
324324
Linux gcc 10.2.0
325325
macOS Apple Xcode 10.1 (using clang 10.0.0)
326-
Windows Microsoft Visual Studio 2019 update 16.7.2
326+
Windows Microsoft Visual Studio 2022 update 17.1.0
327327

328328
All compilers are expected to be able to compile to the C99 language standard,
329329
as some C99 features are used in the source code. Microsoft Visual Studio

make/conf/jib-profiles.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ var getJibProfilesDependencies = function (input, common) {
10491049
var devkit_platform_revisions = {
10501050
linux_x64: "gcc10.3.0-OL6.4+1.0",
10511051
macosx: "Xcode12.4+1.0",
1052-
windows_x64: "VS2019-16.9.3+1.0",
1052+
windows_x64: "VS2022-17.1.0+1.0",
10531053
linux_aarch64: "gcc10.3.0-OL7.6+1.0",
10541054
linux_arm: "gcc8.2.0-Fedora27+1.0",
10551055
linux_ppc64le: "gcc8.2.0-Fedora27+1.0",

make/devkit/createWindowsDevkit2019.sh make/devkit/createWindowsDevkit.sh

+36-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
#
3-
# Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
3+
# Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
44
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
#
66
# This code is free software; you can redistribute it and/or modify it
@@ -28,14 +28,19 @@
2828
# suitable for building OpenJDK and OracleJDK. Needs to run in Cygwin or WSL.
2929
# erik.joelsson@oracle.com
3030

31-
VS_VERSION="2019"
32-
VS_VERSION_NUM_NODOT="160"
31+
usage_and_exit() {
32+
echo "Usage: createWindowsDevkit.sh <2019 | 2022>"
33+
exit 1
34+
}
35+
36+
if [ ! $# = 1 ]; then
37+
usage_and_exit
38+
fi
39+
40+
VS_VERSION="$1"
41+
3342
VS_DLL_VERSION="140"
3443
SDK_VERSION="10"
35-
SDK_FULL_VERSION="10.0.17763.0"
36-
MSVC_DIR="Microsoft.VC142.CRT"
37-
MSVC_FULL_VERSION="14.12.27508"
38-
REDIST_FULL_VERSION="14.20.27508"
3944

4045
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
4146
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
@@ -66,13 +71,33 @@ fi
6671

6772
# Work around the insanely named ProgramFiles(x86) env variable
6873
PROGRAMFILES_X86="$($WINDOWS_PATH_TO_UNIX_PATH "$(cmd.exe /c set | sed -n 's/^ProgramFiles(x86)=//p' | tr -d '\r')")"
74+
PROGRAMFILES="$($WINDOWS_PATH_TO_UNIX_PATH "$PROGRAMFILES")"
75+
76+
case $VS_VERSION in
77+
2019)
78+
MSVC_PROGRAMFILES_DIR="${PROGRAMFILES_X86}"
79+
MSVC_CRT_DIR="Microsoft.VC142.CRT"
80+
VS_VERSION_NUM_NODOT="160"
81+
;;
82+
83+
2022)
84+
MSVC_PROGRAMFILES_DIR="${PROGRAMFILES}"
85+
MSVC_CRT_DIR="Microsoft.VC143.CRT"
86+
VS_VERSION_NUM_NODOT="170"
87+
;;
88+
*)
89+
echo "Unexpected VS version: $VS_VERSION"
90+
usage_and_exit
91+
;;
92+
esac
93+
6994

7095
# Find Visual Studio installation dir
7196
VSNNNCOMNTOOLS=`cmd.exe /c echo %VS${VS_VERSION_NUM_NODOT}COMNTOOLS% | tr -d '\r'`
7297
if [ -d "$VSNNNCOMNTOOLS" ]; then
7398
VS_INSTALL_DIR="$($WINDOWS_PATH_TO_UNIX_PATH "$VSNNNCOMNTOOLS/../..")"
7499
else
75-
VS_INSTALL_DIR="${PROGRAMFILES_X86}/Microsoft Visual Studio/2019"
100+
VS_INSTALL_DIR="${MSVC_PROGRAMFILES_DIR}/Microsoft Visual Studio/$VS_VERSION"
76101
VS_INSTALL_DIR="$(ls -d "${VS_INSTALL_DIR}/"{Community,Professional,Enterprise} 2>/dev/null | head -n1)"
77102
fi
78103
echo "VS_INSTALL_DIR: $VS_INSTALL_DIR"
@@ -101,9 +126,9 @@ DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
101126

102127
echo "Creating devkit in $DEVKIT_ROOT"
103128

104-
MSVCR_DLL=${MSVC_DIR}/vcruntime${VS_DLL_VERSION}.dll
105-
VCRUNTIME_1_DLL=${MSVC_DIR}/vcruntime${VS_DLL_VERSION}_1.dll
106-
MSVCP_DLL=${MSVC_DIR}/msvcp${VS_DLL_VERSION}.dll
129+
MSVCR_DLL=${MSVC_CRT_DIR}/vcruntime${VS_DLL_VERSION}.dll
130+
VCRUNTIME_1_DLL=${MSVC_CRT_DIR}/vcruntime${VS_DLL_VERSION}_1.dll
131+
MSVCP_DLL=${MSVC_CRT_DIR}/msvcp${VS_DLL_VERSION}.dll
107132

108133
################################################################################
109134
# Copy Visual Studio files

0 commit comments

Comments
 (0)