Skip to content

Commit 89428c7

Browse files
committed
build: drop support for VS2017
PR-URL: nodejs#33694 Reviewed-By: Bartosz Sosnowski <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Shelley Vohr <[email protected]> Reviewed-By: João Reis <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Zeyu Yang <[email protected]> Reviewed-By: Matheus Marchini <[email protected]>
1 parent bba9b00 commit 89428c7

File tree

3 files changed

+12
-51
lines changed

3 files changed

+12
-51
lines changed

BUILDING.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ Depending on the host platform, the selection of toolchains may vary.
159159
| Operating System | Compiler Versions |
160160
| ---------------- | -------------------------------------------------------------- |
161161
| Linux | GCC >= 6.3 |
162-
| Windows | Visual Studio >= 2017 with the Windows 10 SDK on a 64-bit host |
162+
| Windows | Visual Studio >= 2019 with the Windows 10 SDK on a 64-bit host |
163163
| macOS | Xcode >= 10 (Apple LLVM >= 10) |
164164

165165
### Official binary platforms and toolchains
@@ -528,7 +528,7 @@ to run it again before invoking `make -j4`.
528528

529529
* [Python 2.7](https://www.python.org/downloads/)
530530
* The "Desktop development with C++" workload from
531-
[Visual Studio 2017 or 2019](https://visualstudio.microsoft.com/downloads/) or
531+
[Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) or
532532
the "Visual C++ build tools" workload from the
533533
[Build Tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019),
534534
with the default optional components.
@@ -543,8 +543,7 @@ to run it again before invoking `make -j4`.
543543
Optional requirements to build the MSI installer package:
544544

545545
* The [WiX Toolset v3.11](https://wixtoolset.org/releases/) and the
546-
[Wix Toolset Visual Studio 2017 Extension](https://marketplace.visualstudio.com/items?itemName=RobMensching.WixToolsetVisualStudio2017Extension)
547-
or the [Wix Toolset Visual Studio 2019 Extension](https://marketplace.visualstudio.com/items?itemName=WixToolset.WixToolsetVisualStudio2019Extension).
546+
[Wix Toolset Visual Studio 2019 Extension](https://marketplace.visualstudio.com/items?itemName=WixToolset.WixToolsetVisualStudio2019Extension).
548547

549548
Optional requirements for compiling for Windows 10 on ARM (ARM64):
550549

@@ -569,7 +568,7 @@ packages:
569568
* [Python 3.x](https://chocolatey.org/packages/python) and
570569
[legacy Python](https://chocolatey.org/packages/python2)
571570
* [Visual Studio 2019 Build Tools](https://chocolatey.org/packages/visualstudio2019buildtools)
572-
with [Visual C++ workload](https://chocolatey.org/packages/visualstudio2017-workload-vctools)
571+
with [Visual C++ workload](https://chocolatey.org/packages/visualstudio2019-workload-vctools)
573572
* [NetWide Assembler](https://chocolatey.org/packages/nasm)
574573

575574
To install Node.js prerequisites using

tools/msvs/install_tools/install_tools.bat

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ echo license terms or not. Read and understand the license terms of the packages
3939
echo being installed and their dependencies prior to installation:
4040
echo - https://chocolatey.org/packages/chocolatey
4141
echo - https://chocolatey.org/packages/python
42-
echo - https://chocolatey.org/packages/visualstudio2017-workload-vctools
42+
echo - https://chocolatey.org/packages/visualstudio2019-workload-vctools
4343
echo.
4444
echo This script is provided AS-IS without any warranties of any kind
4545
echo ----------------------------------------------------------------
@@ -52,4 +52,4 @@ pause
5252

5353
cls
5454

55-
"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command Start-Process '%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe' -ArgumentList '-NoProfile -InputFormat None -ExecutionPolicy Bypass -Command iex ((New-Object System.Net.WebClient).DownloadString(''https://chocolatey.org/install.ps1'')); choco upgrade -y python visualstudio2017-workload-vctools; Read-Host ''Type ENTER to exit'' ' -Verb RunAs
55+
"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command Start-Process '%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe' -ArgumentList '-NoProfile -InputFormat None -ExecutionPolicy Bypass -Command iex ((New-Object System.Net.WebClient).DownloadString(''https://chocolatey.org/install.ps1'')); choco upgrade -y python visualstudio2019-workload-vctools; Read-Host ''Type ENTER to exit'' ' -Verb RunAs

vcbuild.bat

+6-44
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ if /i "%1"=="ia32" set target_arch=x86&goto arg-ok
7979
if /i "%1"=="x86" set target_arch=x86&goto arg-ok
8080
if /i "%1"=="x64" set target_arch=x64&goto arg-ok
8181
if /i "%1"=="arm64" set target_arch=arm64&goto arg-ok
82-
if /i "%1"=="vs2017" set target_env=vs2017&goto arg-ok
8382
if /i "%1"=="vs2019" set target_env=vs2019&goto arg-ok
8483
if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok
8584
if /i "%1"=="projgen" set projgen=1&goto arg-ok
@@ -175,7 +174,6 @@ if defined package set stage_package=1
175174
set "node_exe=%config%\node.exe"
176175
set "node_gyp_exe="%node_exe%" deps\npm\node_modules\node-gyp\bin\node-gyp"
177176
set "npm_exe="%~dp0%node_exe%" %~dp0deps\npm\bin\npm-cli.js"
178-
if "%target_env%"=="vs2017" set "node_gyp_exe=%node_gyp_exe% --msvs_version=2017"
179177
if "%target_env%"=="vs2019" set "node_gyp_exe=%node_gyp_exe% --msvs_version=2019"
180178

181179
:: skip building if the only argument received was lint
@@ -242,25 +240,25 @@ if %target_arch%==x86 if %msvs_host_arch%==x86 set vcvarsall_arg=x86
242240

243241
@rem Look for Visual Studio 2019
244242
:vs-set-2019
245-
if defined target_env if "%target_env%" NEQ "vs2019" goto vs-set-2017
243+
if defined target_env if "%target_env%" NEQ "vs2019" goto msbuild-not-found
246244
echo Looking for Visual Studio 2019
247245
@rem VCINSTALLDIR may be set if run from a VS Command Prompt and needs to be
248246
@rem cleared first as vswhere_usability_wrapper.cmd doesn't when it fails to
249247
@rem detect the version searched for
250248
set "VCINSTALLDIR="
251249
call tools\msvs\vswhere_usability_wrapper.cmd "[16.0,17.0)"
252-
if "_%VCINSTALLDIR%_" == "__" goto vs-set-2017
250+
if "_%VCINSTALLDIR%_" == "__" goto msbuild-not-found
253251
set "WIXSDKDIR=%WIX%\SDK\VS2017"
254252
if defined msi (
255253
echo Looking for WiX installation for Visual Studio 2019...
256254
if not exist "%WIXSDKDIR%" (
257255
echo Failed to find WiX install for Visual Studio 2019
258256
echo VS2019 support for WiX is only present starting at version 3.11
259-
goto vs-set-2017
257+
goto msbuild-not-found
260258
)
261259
if not exist "%VCINSTALLDIR%\..\MSBuild\Microsoft\WiX" (
262260
echo Failed to find the WiX Toolset Visual Studio 2019 Extension
263-
goto vs-set-2017
261+
goto msbuild-not-found
264262
)
265263
)
266264
@rem check if VS2019 is already setup, and for the requested arch
@@ -272,50 +270,14 @@ set "VSCMD_START_DIR=%CD%"
272270
set vcvars_call="%VCINSTALLDIR%\Auxiliary\Build\vcvarsall.bat" %vcvarsall_arg%
273271
echo calling: %vcvars_call%
274272
call %vcvars_call%
275-
if errorlevel 1 goto vs-set-2017
273+
if errorlevel 1 goto msbuild-not-found
276274
if defined DEBUG_HELPER @ECHO ON
277275
:found_vs2019
278276
echo Found MSVS version %VisualStudioVersion%
279277
set GYP_MSVS_VERSION=2019
280278
set PLATFORM_TOOLSET=v142
281279
goto msbuild-found
282280

283-
@rem Look for Visual Studio 2017
284-
:vs-set-2017
285-
if defined target_env if "%target_env%" NEQ "vs2017" goto msbuild-not-found
286-
echo Looking for Visual Studio 2017
287-
call tools\msvs\vswhere_usability_wrapper.cmd "[15.0,16.0)"
288-
if "_%VCINSTALLDIR%_" == "__" goto msbuild-not-found
289-
set "WIXSDKDIR=%WIX%\SDK\VS2017"
290-
if defined msi (
291-
echo Looking for WiX installation for Visual Studio 2017...
292-
if not exist "%WIXSDKDIR%" (
293-
echo Failed to find WiX install for Visual Studio 2017
294-
echo VS2017 support for WiX is only present starting at version 3.11
295-
goto msbuild-not-found
296-
)
297-
if not exist "%VCINSTALLDIR%\..\MSBuild\Microsoft\WiX" (
298-
echo Failed to find the WiX Toolset Visual Studio 2017 Extension
299-
goto msbuild-not-found
300-
)
301-
)
302-
@rem check if VS2017 is already setup, and for the requested arch
303-
if "_%VisualStudioVersion%_" == "_15.0_" if "_%VSCMD_ARG_TGT_ARCH%_"=="_%target_arch%_" goto found_vs2017
304-
@rem need to clear VSINSTALLDIR for vcvarsall to work as expected
305-
set "VSINSTALLDIR="
306-
@rem prevent VsDevCmd.bat from changing the current working directory
307-
set "VSCMD_START_DIR=%CD%"
308-
set vcvars_call="%VCINSTALLDIR%\Auxiliary\Build\vcvarsall.bat" %vcvarsall_arg%
309-
echo calling: %vcvars_call%
310-
call %vcvars_call%
311-
if errorlevel 1 goto msbuild-not-found
312-
if defined DEBUG_HELPER @ECHO ON
313-
:found_vs2017
314-
echo Found MSVS version %VisualStudioVersion%
315-
set GYP_MSVS_VERSION=2017
316-
set PLATFORM_TOOLSET=v141
317-
goto msbuild-found
318-
319281
:msbuild-not-found
320282
echo Failed to find a suitable Visual Studio installation.
321283
echo Try to run in a "Developer Command Prompt" or consult
@@ -705,7 +667,7 @@ set exit_code=1
705667
goto exit
706668

707669
:help
708-
echo vcbuild.bat [debug/release] [msi] [doc] [test/test-all/test-addons/test-js-native-api/test-node-api/test-benchmark/test-internet/test-pummel/test-simple/test-message/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-async-hooks/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] [noetw] [ltcg] [licensetf] [sign] [ia32/x86/x64/arm64] [vs2017/vs2019] [download-all] [lint/lint-ci/lint-js/lint-js-ci/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]
670+
echo vcbuild.bat [debug/release] [msi] [doc] [test/test-all/test-addons/test-js-native-api/test-node-api/test-benchmark/test-internet/test-pummel/test-simple/test-message/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-async-hooks/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] [noetw] [ltcg] [licensetf] [sign] [ia32/x86/x64/arm64] [vs2019] [download-all] [lint/lint-ci/lint-js/lint-js-ci/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]
709671
echo Examples:
710672
echo vcbuild.bat : builds release build
711673
echo vcbuild.bat debug : builds debug build

0 commit comments

Comments
 (0)