Skip to content

Commit ac2a68c

Browse files
authored
build: drop support for Visual Studio 2019
V8 and Chromium are starting to use C++20 features. Only Visual Studio 2022 17.6 includes a version of MSVC with sufficient C++20 support to compile V8. Refs: https://bugs.chromium.org/p/chromium/issues/detail?id=1284275 Refs: #45427 PR-URL: #49051 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Ruy Adorno <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent f10928f commit ac2a68c

File tree

3 files changed

+8
-37
lines changed

3 files changed

+8
-37
lines changed

.github/workflows/build-windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
if: github.event.pull_request.draft == false
3535
strategy:
3636
matrix:
37-
windows: [windows-2019, windows-2022]
37+
windows: [windows-2022]
3838
fail-fast: false
3939
runs-on: ${{ matrix.windows }}
4040
steps:

BUILDING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Depending on the host platform, the selection of toolchains may vary.
153153
| Operating System | Compiler Versions |
154154
| ---------------- | -------------------------------------------------------------- |
155155
| Linux | GCC >= 10.1 |
156-
| Windows | Visual Studio >= 2019 with the Windows 10 SDK on a 64-bit host |
156+
| Windows | Visual Studio >= 2022 with the Windows 10 SDK on a 64-bit host |
157157
| macOS | Xcode >= 13 (Apple LLVM >= 12) |
158158

159159
### Official binary platforms and toolchains
@@ -170,7 +170,7 @@ Binaries at <https://nodejs.org/download/release/> are produced on:
170170
| linux-ppc64le | RHEL 8 with gcc-toolset-10[^6] |
171171
| linux-s390x | RHEL 8 with gcc-toolset-10[^6] |
172172
| linux-x64 | RHEL 8 with gcc-toolset-10[^6] |
173-
| win-x64 and win-x86 | Windows 2012 R2 (x64) with Visual Studio 2019 |
173+
| win-x64 and win-x86 | Windows Server 2022 (x64) with Visual Studio 2022 |
174174

175175
[^6]: Binaries produced on these systems are compatible with glibc >= 2.28
176176
and libstdc++ >= 6.0.25 (`GLIBCXX_3.4.25`). These are available on

vcbuild.bat

+5-34
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ if /i "%1"=="ia32" set target_arch=x86&goto arg-ok
8383
if /i "%1"=="x86" set target_arch=x86&goto arg-ok
8484
if /i "%1"=="x64" set target_arch=x64&goto arg-ok
8585
if /i "%1"=="arm64" set target_arch=arm64&goto arg-ok
86-
if /i "%1"=="vs2019" set target_env=vs2019&goto arg-ok
8786
if /i "%1"=="vs2022" set target_env=vs2022&goto arg-ok
8887
if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok
8988
if /i "%1"=="projgen" set projgen=1&goto arg-ok
@@ -176,7 +175,6 @@ if defined package set stage_package=1
176175
set "node_exe=%config%\node.exe"
177176
set "node_gyp_exe="%node_exe%" deps\npm\node_modules\node-gyp\bin\node-gyp"
178177
set "npm_exe="%~dp0%node_exe%" %~dp0deps\npm\bin\npm-cli.js"
179-
if "%target_env%"=="vs2019" set "node_gyp_exe=%node_gyp_exe% --msvs_version=2019"
180178
if "%target_env%"=="vs2022" set "node_gyp_exe=%node_gyp_exe% --msvs_version=2022"
181179

182180
:: skip building if the only argument received was lint
@@ -246,14 +244,14 @@ if %target_arch%==%msvs_host_arch% set vcvarsall_arg=%target_arch%
246244

247245
@rem Look for Visual Studio 2022
248246
:vs-set-2022
249-
if defined target_env if "%target_env%" NEQ "vs2022" goto vs-set-2019
247+
if defined target_env if "%target_env%" NEQ "vs2022" goto msbuild-not-found
250248
echo Looking for Visual Studio 2022
251249
@rem VCINSTALLDIR may be set if run from a VS Command Prompt and needs to be
252250
@rem cleared first as vswhere_usability_wrapper.cmd doesn't when it fails to
253251
@rem detect the version searched for
254252
if not defined target_env set "VCINSTALLDIR="
255-
call tools\msvs\vswhere_usability_wrapper.cmd "[17.0,18.0)" %target_arch% "prerelease"
256-
if "_%VCINSTALLDIR%_" == "__" goto vs-set-2019
253+
call tools\msvs\vswhere_usability_wrapper.cmd "[17.6,18.0)" %target_arch% "prerelease"
254+
if "_%VCINSTALLDIR%_" == "__" goto msbuild-not-found
257255
@rem check if VS2022 is already setup, and for the requested arch
258256
if "_%VisualStudioVersion%_" == "_17.0_" if "_%VSCMD_ARG_TGT_ARCH%_"=="_%target_arch%_" goto found_vs2022
259257
@rem need to clear VSINSTALLDIR for vcvarsall to work as expected
@@ -263,41 +261,14 @@ set "VSCMD_START_DIR=%CD%"
263261
set vcvars_call="%VCINSTALLDIR%\Auxiliary\Build\vcvarsall.bat" %vcvarsall_arg%
264262
echo calling: %vcvars_call%
265263
call %vcvars_call%
266-
if errorlevel 1 goto vs-set-2019
264+
if errorlevel 1 goto msbuild-not-found
267265
if defined DEBUG_HELPER @ECHO ON
268266
:found_vs2022
269267
echo Found MSVS version %VisualStudioVersion%
270268
set GYP_MSVS_VERSION=2022
271269
set PLATFORM_TOOLSET=v143
272270
goto msbuild-found
273271

274-
@rem Look for Visual Studio 2019
275-
:vs-set-2019
276-
if defined target_env if "%target_env%" NEQ "vs2019" goto msbuild-not-found
277-
echo Looking for Visual Studio 2019
278-
@rem VCINSTALLDIR may be set if run from a VS Command Prompt and needs to be
279-
@rem cleared first as vswhere_usability_wrapper.cmd doesn't when it fails to
280-
@rem detect the version searched for
281-
if not defined target_env set "VCINSTALLDIR="
282-
call tools\msvs\vswhere_usability_wrapper.cmd "[16.0,17.0)" %target_arch% "prerelease"
283-
if "_%VCINSTALLDIR%_" == "__" goto msbuild-not-found
284-
@rem check if VS2019 is already setup, and for the requested arch
285-
if "_%VisualStudioVersion%_" == "_16.0_" if "_%VSCMD_ARG_TGT_ARCH%_"=="_%target_arch%_" goto found_vs2019
286-
@rem need to clear VSINSTALLDIR for vcvarsall to work as expected
287-
set "VSINSTALLDIR="
288-
@rem prevent VsDevCmd.bat from changing the current working directory
289-
set "VSCMD_START_DIR=%CD%"
290-
set vcvars_call="%VCINSTALLDIR%\Auxiliary\Build\vcvarsall.bat" %vcvarsall_arg%
291-
echo calling: %vcvars_call%
292-
call %vcvars_call%
293-
if errorlevel 1 goto msbuild-not-found
294-
if defined DEBUG_HELPER @ECHO ON
295-
:found_vs2019
296-
echo Found MSVS version %VisualStudioVersion%
297-
set GYP_MSVS_VERSION=2019
298-
set PLATFORM_TOOLSET=v142
299-
goto msbuild-found
300-
301272
:msbuild-not-found
302273
echo Failed to find a suitable Visual Studio installation.
303274
echo Try to run in a "Developer Command Prompt" or consult
@@ -740,7 +711,7 @@ set exit_code=1
740711
goto exit
741712

742713
:help
743-
echo vcbuild.bat [debug/release] [msi] [doc] [test/test-all/test-addons/test-doc/test-js-native-api/test-node-api/test-internet/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [nonpm] [nocorepack] [ltcg] [licensetf] [sign] [ia32/x86/x64/arm64] [vs2019/vs2022] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-md] [lint-md-build] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm]
714+
echo vcbuild.bat [debug/release] [msi] [doc] [test/test-all/test-addons/test-doc/test-js-native-api/test-node-api/test-internet/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [nonpm] [nocorepack] [ltcg] [licensetf] [sign] [ia32/x86/x64/arm64] [vs2022] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-md] [lint-md-build] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm]
744715
echo Examples:
745716
echo vcbuild.bat : builds release build
746717
echo vcbuild.bat debug : builds debug build

0 commit comments

Comments
 (0)