New issue
Advanced search Search tips

Issue 634788 link

Starred by 5 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug

Blocking:
issue 627216



Sign in to add a comment

Windows: Allow configuration of the Windows SDK version via GN

Project Member Reported by marshall@chromium.org, Aug 5 2016

Issue description

Version: master revision fc6aaca4 (#406441)
OS: Windows 10 64-bit

What steps will reproduce the problem?
(1) Attempt to build Chromium using a local installation of VS 2015 Update 3 (set DEPOT_TOOLS_WIN_TOOLCHAIN=0)

What is the expected output?
The build should succeed.

What do you see instead?
The build fails due to default selection of incorrect/unsupported Windows SDK version.

Please use labels and text to provide additional information.
With a local installation of Update 3 GN is selecting the 10.0.14393.0 SDK by default when writing the environment.* files. We can fix this by passing the SDK version as the 2nd argument to vcvarsall.bat in build/toolchain/win/setup_toolchain.py [1]. The script will then return environment variables configured to use that version. For example:

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 10.0.10586.0

The SDK version is also currently hard-coded in tools/gn/visual_studio_writer.cc [2] and used when writing certain include paths in generated VS project files.

We should probably add a new GN argument in build/config/win/visual_studio_version.gni (defaulting to the currently supported 10.0.10586.0) and use that for configuring the SDK version everywhere.

[1] https://cs.chromium.org/chromium/src/build/toolchain/win/setup_toolchain.py?dr=C&q=setup_toolchain.py+vcvarsall.bat&sq=package:chromium&l=126
[2] https://cs.chromium.org/chromium/src/tools/gn/visual_studio_writer.cc?dr=C&q=kWindowsKitsIncludeVersion&sq=package:chromium&l=79
 
Blocking: 627216
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8480d86659b860587f9ee3995d167bda743492aa

commit 8480d86659b860587f9ee3995d167bda743492aa
Author: Andrew Boyarshin <andrew.boyarshin@gmail.com>
Date: Sat Jun 17 16:36:09 2017

tools/gn: Implement Windows SDK version command line switch

Windows SDK command line switch enables ability to browse source code
smoothly in Visual Studio using various installed Windows SDK versions.

BUG=634788

Change-Id: I64af058a0ccfd10a189cda61938a9ec7b5f9c60d
Reviewed-on: https://chromium-review.googlesource.com/535639
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#480307}
[modify] https://crrev.com/8480d86659b860587f9ee3995d167bda743492aa/AUTHORS
[modify] https://crrev.com/8480d86659b860587f9ee3995d167bda743492aa/tools/gn/command_gen.cc
[modify] https://crrev.com/8480d86659b860587f9ee3995d167bda743492aa/tools/gn/visual_studio_writer.cc
[modify] https://crrev.com/8480d86659b860587f9ee3995d167bda743492aa/tools/gn/visual_studio_writer.h
[modify] https://crrev.com/8480d86659b860587f9ee3995d167bda743492aa/tools/gn/visual_studio_writer_unittest.cc

Sign in to add a comment