aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn15
-rw-r--r--infra/bots/recipe_modules/flavor/default_flavor.py14
-rw-r--r--infra/bots/recipe_modules/flavor/gn_flavor.py14
-rw-r--r--infra/bots/recipes/swarm_compile.expected/Build-Win-MSVC-x86_64-Release-Vulkan.json44
-rw-r--r--infra/bots/recipes/swarm_test.expected/Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan.json6
5 files changed, 54 insertions, 39 deletions
diff --git a/BUILD.gn b/BUILD.gn
index e1f0fc8212..14918da1b3 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -118,10 +118,19 @@ config("skia_private") {
lib_dirs = []
if (skia_use_vulkan) {
if (skia_vulkan_sdk != "") {
- include_dirs += [ "$skia_vulkan_sdk/x86_64/include/" ]
- lib_dirs += [ "$skia_vulkan_sdk/x86_64/lib/" ]
+ if (is_win) {
+ include_dirs += [ "$skia_vulkan_sdk/Include/" ]
+ lib_dirs += [ "$skia_vulkan_sdk/Bin" ]
+ } else {
+ include_dirs += [ "$skia_vulkan_sdk/x86_64/include/" ]
+ lib_dirs += [ "$skia_vulkan_sdk/x86_64/lib/" ]
+ }
+ }
+ if (is_win) {
+ libs += [ "vulkan-1.lib" ]
+ } else {
+ libs += [ "vulkan" ]
}
- libs += [ "vulkan" ]
}
}
diff --git a/infra/bots/recipe_modules/flavor/default_flavor.py b/infra/bots/recipe_modules/flavor/default_flavor.py
index aa8669b3a4..64f35f12ce 100644
--- a/infra/bots/recipe_modules/flavor/default_flavor.py
+++ b/infra/bots/recipe_modules/flavor/default_flavor.py
@@ -126,8 +126,6 @@ class DefaultFlavorUtils(object):
if self.m.platform.is_win:
make_cmd = ['python', 'make.py']
self.m.run.run_once(self.bootstrap_win_toolchain)
- if 'Vulkan' in self.m.vars.builder_name:
- env['VULKAN_SDK'] = self.m.vars.slave_dir.join('win_vulkan_sdk')
else:
make_cmd = ['make']
cmd = make_cmd + [target]
@@ -143,17 +141,7 @@ class DefaultFlavorUtils(object):
raise
def copy_extra_build_products(self, swarming_out_dir):
- """Copy extra build products to specified directory.
-
- Copy flavor-specific build products to swarming_out_dir for use in test and
- perf steps."""
- if ("Win" in self.m.vars.builder_name and
- "Vulkan" in self.m.vars.builder_name):
- # This copies vulkan-1.dll that has been bundled into win_vulkan_sdk
- # since version 2 See skia/api BUILD_PRODUCTS_ISOLATE_WHITELIST
- self.m.run.copy_build_products(
- self.m.path['slave_build'].join('win_vulkan_sdk'),
- swarming_out_dir)
+ pass
@property
def out_dir(self):
diff --git a/infra/bots/recipe_modules/flavor/gn_flavor.py b/infra/bots/recipe_modules/flavor/gn_flavor.py
index d06d7c4226..78b323dac7 100644
--- a/infra/bots/recipe_modules/flavor/gn_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_flavor.py
@@ -23,6 +23,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
extra_config == 'Mesa',
extra_config == 'NoGPU',
extra_config.startswith('SK'),
+ extra_config == 'Vulkan',
os == 'Ubuntu' and target_arch == 'x86',
])
@@ -62,6 +63,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
win_toolchain = str(self.m.vars.slave_dir.join(
't', 'depot_tools', 'win_toolchain', 'vs_files',
'95ddda401ec5678f15eeed01d2bee08fcbc5ee97'))
+ win_vulkan_sdk = str(self.m.vars.slave_dir.join('win_vulkan_sdk'))
cc, cxx = None, None
extra_cflags = []
@@ -107,6 +109,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
'cc': cc,
'cxx': cxx,
'sanitize': extra_config if 'SAN' in extra_config else '',
+ 'skia_vulkan_sdk': win_vulkan_sdk if extra_config == 'Vulkan' else '',
'target_cpu': 'x86' if target_arch == 'x86' else '',
'windk': win_toolchain if 'Win' in os else '',
}.iteritems():
@@ -127,6 +130,17 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
self._run('ninja', [ninja, '-C', self.out_dir],
env={'NINJA_STATUS': '%%e [%%f/%%t] '})
+ def copy_extra_build_products(self, swarming_out_dir):
+ configuration = self.m.vars.builder_cfg.get('configuration', '')
+ extra_config = self.m.vars.builder_cfg.get('extra_config', '')
+ os = self.m.vars.builder_cfg.get('os', '')
+
+ win_vulkan_sdk = str(self.m.vars.slave_dir.join('win_vulkan_sdk'))
+ if 'Win' in os and extra_config == 'Vulkan':
+ self.m.run.copy_build_products(
+ win_vulkan_sdk,
+ swarming_out_dir.join('out', configuration + '_x64'))
+
def step(self, name, cmd, env=None, **kwargs):
app = self.m.vars.skia_out.join(self.m.vars.configuration, cmd[0])
cmd = [app] + cmd[1:]
diff --git a/infra/bots/recipes/swarm_compile.expected/Build-Win-MSVC-x86_64-Release-Vulkan.json b/infra/bots/recipes/swarm_compile.expected/Build-Win-MSVC-x86_64-Release-Vulkan.json
index 1d129be990..c8c6814957 100644
--- a/infra/bots/recipes/swarm_compile.expected/Build-Win-MSVC-x86_64-Release-Vulkan.json
+++ b/infra/bots/recipes/swarm_compile.expected/Build-Win-MSVC-x86_64-Release-Vulkan.json
@@ -123,31 +123,39 @@
"cmd": [
"python",
"-u",
- "[CUSTOM_C:\\_B_WORK]\\skia\\infra\\bots\\bootstrap_win_toolchain_json.py",
- "--win_toolchain_json",
- "[SLAVE_BUILD]\\src\\build\\win_toolchain.json",
- "--depot_tools_parent_dir",
- "[SLAVE_BUILD]"
+ "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\fetch-gn"
],
- "name": "bootstrap win toolchain"
+ "cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
+ "env": {
+ "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools];RECIPE_PACKAGE_REPO[depot_tools];RECIPE_PACKAGE_REPO[depot_tools];RECIPE_PACKAGE_REPO[depot_tools]"
+ },
+ "name": "fetch-gn"
},
{
"cmd": [
- "python",
- "make.py",
- "most"
+ "gn.bat",
+ "gen",
+ "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86_64-Release-Vulkan\\Release_x64",
+ "--args=is_debug=false skia_vulkan_sdk=\"[SLAVE_BUILD]\\win_vulkan_sdk\" windk=\"[SLAVE_BUILD]\\t\\depot_tools\\win_toolchain\\vs_files\\95ddda401ec5678f15eeed01d2bee08fcbc5ee97\""
],
"cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
"env": {
- "BUILDTYPE": "Release_x64",
- "CHROME_HEADLESS": "1",
- "CHROME_PATH": "[SLAVE_BUILD]\\src",
- "GYP_DEFINES": "qt_sdk=C:/Qt/4.8.5/ skia_arch_type=x86_64 skia_vulkan=1 skia_vulkan_debug_layers=0 skia_warnings_as_errors=1 skia_win_debuggers_path=c:/DbgHelp skia_win_ltcg=0",
- "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools];RECIPE_PACKAGE_REPO[depot_tools];RECIPE_PACKAGE_REPO[depot_tools];RECIPE_PACKAGE_REPO[depot_tools]",
- "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86_64-Release-Vulkan",
- "VULKAN_SDK": "[SLAVE_BUILD]\\win_vulkan_sdk"
+ "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools];RECIPE_PACKAGE_REPO[depot_tools];RECIPE_PACKAGE_REPO[depot_tools];RECIPE_PACKAGE_REPO[depot_tools]"
},
- "name": "build most"
+ "name": "gn gen"
+ },
+ {
+ "cmd": [
+ "ninja.exe",
+ "-C",
+ "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86_64-Release-Vulkan\\Release_x64"
+ ],
+ "cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
+ "env": {
+ "NINJA_STATUS": "%%e [%%f/%%t] ",
+ "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools];RECIPE_PACKAGE_REPO[depot_tools];RECIPE_PACKAGE_REPO[depot_tools];RECIPE_PACKAGE_REPO[depot_tools]"
+ },
+ "name": "ninja"
},
{
"cmd": [
@@ -192,7 +200,7 @@
"-u",
"import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n",
"[SLAVE_BUILD]\\win_vulkan_sdk",
- "[CUSTOM_[SWARM_OUT_DIR]]"
+ "[CUSTOM_[SWARM_OUT_DIR]]\\out\\Release_x64"
],
"name": "copy build products (2)",
"~followup_annotations": [
diff --git a/infra/bots/recipes/swarm_test.expected/Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan.json b/infra/bots/recipes/swarm_test.expected/Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan.json
index 655d63db37..786f1fc522 100644
--- a/infra/bots/recipes/swarm_test.expected/Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan.json
+++ b/infra/bots/recipes/swarm_test.expected/Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan.json
@@ -365,11 +365,7 @@
"_",
".SRW"
],
- "env": {
- "BUILDTYPE": "Debug_x64",
- "CHROME_HEADLESS": "1",
- "SKIA_OUT": "[SLAVE_BUILD]\\out"
- },
+ "cwd": "[SLAVE_BUILD]\\skia",
"name": "dm"
},
{