Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 7b63d80

Browse files
committed
[[ Win32 ]] Use MSVS 2017 to build windows
This patch works around gyp issues with MSVS 2017 by continuing to use `-Gmsvs_version=2015` but overriding the `msvs_target_platform_version` and `msbuild_toolset` variables.
1 parent 25347f9 commit 7b63d80

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

buildbot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def __enter__(self):
183183
os.environ['_MSPDBSRV_ENDPOINT_'] = str(uuid.uuid4())
184184

185185
mspdbsrv_exe = os.path.join(config.get_program_files_x86(),
186-
'Microsoft Visual Studio 10.0\\Common7\\IDE\\mspdbsrv.exe')
186+
'Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.10.25017\\bin\\HostX86\\x86\\mspdbsrv.exe')
187187
args = [mspdbsrv_exe, '-start', '-shutdowntime', '-1']
188188
print(' '.join(args))
189189
self.proc = subprocess.Popen(args, close_fds=True)

config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@ def validate_windows_tools(opts):
346346
opts['QUICKTIME_SDK'] = guess_quicktime_sdk()
347347

348348
if opts['WIN_MSVS_VERSION'] is None:
349+
# TODO [2017-04-11]: This should be 2017, but it is not
350+
# compatible with our gyp as is.
349351
opts['WIN_MSVS_VERSION'] = '2015'
350352

351353
################################################################

config/win32.gypi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
# Don't assume a Cygwin environment when invoking actions
2929
'msvs_cygwin_shell': 0,
3030

31+
# TODO [2017-04-11]: Remove these overrides when we can use
32+
# -Gmsvs_version=2017
33+
"msvs_target_platform_version" : "10.0.14393.0",
34+
"msbuild_toolset" : "v141",
35+
3136
'configurations':
3237
{
3338
'Debug':

make.cmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ if /I "%BUILD_PLATFORM%"=="win-x86" (
2929
@set MSBUILD_PLATFORM=Win32
3030
)
3131

32-
@rem Try to build with VS 2015 build tools by default
33-
if not defined VSINSTALLDIR set VSINSTALLDIR=%ProgramFilesBase%\Microsoft Visual Studio 14.0\
34-
call "%VSINSTALLDIR%VC\vcvarsall.bat" %VSCMD_ARG_TGT_ARCH%
32+
@rem Try to build with VS 2017 build tools by default
33+
if not defined VSINSTALLDIR set VSINSTALLDIR=%ProgramFilesBase%\Microsoft Visual Studio\2017\BuildTools\
34+
call "%VSINSTALLDIR%VC\Auxiliary\Build\vcvarsall.bat" %VSCMD_ARG_TGT_ARCH%
3535

3636
@if "%1" NEQ "" set MSBUILD_TARGET_ARG=/t:%1
3737

prebuilt/fetch-libraries.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ LIBS_linux=( OpenSSL Curl ICU CEF )
1616
LIBS_emscripten=( ICU )
1717

1818
SUBPLATFORMS_ios=(iPhoneSimulator8.2 iPhoneSimulator9.2 iPhoneSimulator10.2 iPhoneOS9.2 iPhoneOS10.2)
19-
SUBPLATFORMS_win32=(v140_static_debug v140_static_release)
19+
SUBPLATFORMS_win32=(v141_static_debug v141_static_release)
2020

2121
# Fetch settings
2222
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)

0 commit comments

Comments
 (0)