GN/Win: support win_toolchain asset?
CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Win-MSVC-x86_64-Debug-GN-Trybot
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3246
Change-Id: Ib38d4f16788bc27ad81975a4c1b0a732e5df1de3
Reviewed-on: https://skia-review.googlesource.com/3246
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index 7dc8f47..2ced468 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -54,15 +54,24 @@
"NOMINMAX",
]
include_dirs = [
+ "$windk/VC/include",
+ # For local builds.
"$windk/../Windows Kits/10/Include/10.0.10150.0/ucrt",
"$windk/../Windows Kits/8.1/Include/shared",
"$windk/../Windows Kits/8.1/Include/um",
- "$windk/VC/include",
+ # For builds using win_toolchain asset.
+ "$windk/win_sdk/Include/10.0.10586.0/shared",
+ "$windk/win_sdk/Include/10.0.10586.0/ucrt",
+ "$windk/win_sdk/Include/10.0.10586.0/um",
]
lib_dirs = [
+ "$windk/VC/lib/amd64",
+ # For local builds.
"$windk/../Windows Kits/10/Lib/10.0.10150.0/ucrt/x64",
"$windk/../Windows Kits/8.1/Lib/winv6.3/um/x64",
- "$windk/VC/lib/amd64",
+ # For builds using win_toolchain asset.
+ "$windk/win_sdk/Lib/10.0.10586.0/ucrt/x64",
+ "$windk/win_sdk/Lib/10.0.10586.0/um/x64",
]
} else {
cflags += [
@@ -367,8 +376,7 @@
}
tool("stamp") {
- win_stamp_path = rebase_path("win_stamp.py")
- command = "python $win_stamp_path {{output}}"
+ command = "cmd.exe /c echo > {{output}}"
}
}
diff --git a/gn/win_stamp.py b/gn/win_stamp.py
deleted file mode 100644
index 3d23dd8..0000000
--- a/gn/win_stamp.py
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2016 Google Inc.
-#
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Implement stamp for windows.
-
-import sys
-open(sys.argv[1], 'w').close()
diff --git a/infra/bots/recipe_modules/flavor/gn_flavor.py b/infra/bots/recipe_modules/flavor/gn_flavor.py
index 5742319..3602737 100644
--- a/infra/bots/recipe_modules/flavor/gn_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_flavor.py
@@ -57,7 +57,9 @@
target_arch = self.m.vars.builder_cfg.get('target_arch', '')
clang_linux = str(self.m.vars.slave_dir.join('clang_linux'))
- win_toolchain = str(self.m.vars.slave_dir.join('t'))
+ win_toolchain = str(self.m.vars.slave_dir.join(
+ 't', 'depot_tools', 'win_toolchain', 'vs_files',
+ '95ddda401ec5678f15eeed01d2bee08fcbc5ee97'))
cc, cxx = None, None
extra_cflags = []
diff --git a/infra/bots/recipes/swarm_compile.expected/Build-Win-MSVC-x86-Release-GN.json b/infra/bots/recipes/swarm_compile.expected/Build-Win-MSVC-x86-Release-GN.json
index 49a9c7a..f3ccd72 100644
--- a/infra/bots/recipes/swarm_compile.expected/Build-Win-MSVC-x86-Release-GN.json
+++ b/infra/bots/recipes/swarm_compile.expected/Build-Win-MSVC-x86-Release-GN.json
@@ -136,7 +136,7 @@
"gn.bat",
"gen",
"[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Release-GN\\Release",
- "--args=is_debug=false target_cpu=\"x86\" windk=\"[SLAVE_BUILD]\\t\""
+ "--args=is_debug=false target_cpu=\"x86\" windk=\"[SLAVE_BUILD]\\t\\depot_tools\\win_toolchain\\vs_files\\95ddda401ec5678f15eeed01d2bee08fcbc5ee97\""
],
"cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
"env": {