Skip to content

Commit

Permalink
build: drop support for VS2017
Browse files Browse the repository at this point in the history
PR-URL: #33694
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
  • Loading branch information
targos committed Jun 12, 2020
1 parent bba9b00 commit 89428c7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 51 deletions.
9 changes: 4 additions & 5 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Depending on the host platform, the selection of toolchains may vary.
| Operating System | Compiler Versions |
| ---------------- | -------------------------------------------------------------- |
| Linux | GCC >= 6.3 |
| Windows | Visual Studio >= 2017 with the Windows 10 SDK on a 64-bit host |
| Windows | Visual Studio >= 2019 with the Windows 10 SDK on a 64-bit host |
| macOS | Xcode >= 10 (Apple LLVM >= 10) |

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

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

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

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

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

To install Node.js prerequisites using
Expand Down
4 changes: 2 additions & 2 deletions tools/msvs/install_tools/install_tools.bat
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ echo license terms or not. Read and understand the license terms of the packages
echo being installed and their dependencies prior to installation:
echo - https://chocolatey.org/packages/chocolatey
echo - https://chocolatey.org/packages/python
echo - https://chocolatey.org/packages/visualstudio2017-workload-vctools
echo - https://chocolatey.org/packages/visualstudio2019-workload-vctools
echo.
echo This script is provided AS-IS without any warranties of any kind
echo ----------------------------------------------------------------
Expand All @@ -52,4 +52,4 @@ pause

cls

"%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
"%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
50 changes: 6 additions & 44 deletions vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ if /i "%1"=="ia32" set target_arch=x86&goto arg-ok
if /i "%1"=="x86" set target_arch=x86&goto arg-ok
if /i "%1"=="x64" set target_arch=x64&goto arg-ok
if /i "%1"=="arm64" set target_arch=arm64&goto arg-ok
if /i "%1"=="vs2017" set target_env=vs2017&goto arg-ok
if /i "%1"=="vs2019" set target_env=vs2019&goto arg-ok
if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok
if /i "%1"=="projgen" set projgen=1&goto arg-ok
Expand Down Expand Up @@ -175,7 +174,6 @@ if defined package set stage_package=1
set "node_exe=%config%\node.exe"
set "node_gyp_exe="%node_exe%" deps\npm\node_modules\node-gyp\bin\node-gyp"
set "npm_exe="%~dp0%node_exe%" %~dp0deps\npm\bin\npm-cli.js"
if "%target_env%"=="vs2017" set "node_gyp_exe=%node_gyp_exe% --msvs_version=2017"
if "%target_env%"=="vs2019" set "node_gyp_exe=%node_gyp_exe% --msvs_version=2019"

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

@rem Look for Visual Studio 2019
:vs-set-2019
if defined target_env if "%target_env%" NEQ "vs2019" goto vs-set-2017
if defined target_env if "%target_env%" NEQ "vs2019" goto msbuild-not-found
echo Looking for Visual Studio 2019
@rem VCINSTALLDIR may be set if run from a VS Command Prompt and needs to be
@rem cleared first as vswhere_usability_wrapper.cmd doesn't when it fails to
@rem detect the version searched for
set "VCINSTALLDIR="
call tools\msvs\vswhere_usability_wrapper.cmd "[16.0,17.0)"
if "_%VCINSTALLDIR%_" == "__" goto vs-set-2017
if "_%VCINSTALLDIR%_" == "__" goto msbuild-not-found
set "WIXSDKDIR=%WIX%\SDK\VS2017"
if defined msi (
echo Looking for WiX installation for Visual Studio 2019...
if not exist "%WIXSDKDIR%" (
echo Failed to find WiX install for Visual Studio 2019
echo VS2019 support for WiX is only present starting at version 3.11
goto vs-set-2017
goto msbuild-not-found
)
if not exist "%VCINSTALLDIR%\..\MSBuild\Microsoft\WiX" (
echo Failed to find the WiX Toolset Visual Studio 2019 Extension
goto vs-set-2017
goto msbuild-not-found
)
)
@rem check if VS2019 is already setup, and for the requested arch
Expand All @@ -272,50 +270,14 @@ set "VSCMD_START_DIR=%CD%"
set vcvars_call="%VCINSTALLDIR%\Auxiliary\Build\vcvarsall.bat" %vcvarsall_arg%
echo calling: %vcvars_call%
call %vcvars_call%
if errorlevel 1 goto vs-set-2017
if errorlevel 1 goto msbuild-not-found
if defined DEBUG_HELPER @ECHO ON
:found_vs2019
echo Found MSVS version %VisualStudioVersion%
set GYP_MSVS_VERSION=2019
set PLATFORM_TOOLSET=v142
goto msbuild-found

@rem Look for Visual Studio 2017
:vs-set-2017
if defined target_env if "%target_env%" NEQ "vs2017" goto msbuild-not-found
echo Looking for Visual Studio 2017
call tools\msvs\vswhere_usability_wrapper.cmd "[15.0,16.0)"
if "_%VCINSTALLDIR%_" == "__" goto msbuild-not-found
set "WIXSDKDIR=%WIX%\SDK\VS2017"
if defined msi (
echo Looking for WiX installation for Visual Studio 2017...
if not exist "%WIXSDKDIR%" (
echo Failed to find WiX install for Visual Studio 2017
echo VS2017 support for WiX is only present starting at version 3.11
goto msbuild-not-found
)
if not exist "%VCINSTALLDIR%\..\MSBuild\Microsoft\WiX" (
echo Failed to find the WiX Toolset Visual Studio 2017 Extension
goto msbuild-not-found
)
)
@rem check if VS2017 is already setup, and for the requested arch
if "_%VisualStudioVersion%_" == "_15.0_" if "_%VSCMD_ARG_TGT_ARCH%_"=="_%target_arch%_" goto found_vs2017
@rem need to clear VSINSTALLDIR for vcvarsall to work as expected
set "VSINSTALLDIR="
@rem prevent VsDevCmd.bat from changing the current working directory
set "VSCMD_START_DIR=%CD%"
set vcvars_call="%VCINSTALLDIR%\Auxiliary\Build\vcvarsall.bat" %vcvarsall_arg%
echo calling: %vcvars_call%
call %vcvars_call%
if errorlevel 1 goto msbuild-not-found
if defined DEBUG_HELPER @ECHO ON
:found_vs2017
echo Found MSVS version %VisualStudioVersion%
set GYP_MSVS_VERSION=2017
set PLATFORM_TOOLSET=v141
goto msbuild-found

:msbuild-not-found
echo Failed to find a suitable Visual Studio installation.
echo Try to run in a "Developer Command Prompt" or consult
Expand Down Expand Up @@ -705,7 +667,7 @@ set exit_code=1
goto exit

:help
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]
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]
echo Examples:
echo vcbuild.bat : builds release build
echo vcbuild.bat debug : builds debug build
Expand Down

0 comments on commit 89428c7

Please sign in to comment.