Skip to content

Commit a9a9b90

Browse files
committed
8283723: Update Visual Studio 2022 to version 17.1.0 for Oracle builds on Windows
Reviewed-by: erikj, ihse
1 parent 489b27d commit a9a9b90

File tree

5 files changed

+39
-235
lines changed

5 files changed

+39
-235
lines changed

doc/building.html

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

doc/building.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ issues.
331331
------------------ -------------------------------------------------------
332332
Linux gcc 11.2.0
333333
macOS Apple Xcode 10.1 (using clang 10.0.0)
334-
Windows Microsoft Visual Studio 2019 update 16.7.2
334+
Windows Microsoft Visual Studio 2022 update 17.1.0
335335

336336
All compilers are expected to be able to compile to the C99 language standard,
337337
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
@@ -1054,7 +1054,7 @@ var getJibProfilesDependencies = function (input, common) {
10541054
var devkit_platform_revisions = {
10551055
linux_x64: "gcc11.2.0-OL6.4+1.0",
10561056
macosx: "Xcode12.4+1.0",
1057-
windows_x64: "VS2019-16.9.3+1.0",
1057+
windows_x64: "VS2022-17.1.0+1.0",
10581058
linux_aarch64: "gcc11.2.0-OL7.6+1.0",
10591059
linux_arm: "gcc8.2.0-Fedora27+1.0",
10601060
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

make/devkit/createWindowsDevkit2017.sh

-221
This file was deleted.

0 commit comments

Comments
 (0)