aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-08-31 12:35:21 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-31 12:35:21 -0700
commitda8f6546da87ff72db785cef268b176547541fed (patch)
tree9048d2996032017a0a4deb4b7b644995802cebac
parent29df76096fd30941086324902a82656df2d8becd (diff)
Add and use a clang_linux asset.
This gives us a consistent Clang toolchain on Linux bots, most importantly for *SAN bots. It's ~300MB unpacked. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2294353002 Review-Url: https://codereview.chromium.org/2294353002
-rw-r--r--infra/bots/assets/clang_linux/VERSION1
-rwxr-xr-xinfra/bots/assets/clang_linux/common.py26
-rwxr-xr-xinfra/bots/assets/clang_linux/create.py54
-rwxr-xr-xinfra/bots/assets/clang_linux/create_and_upload.py42
-rwxr-xr-xinfra/bots/assets/clang_linux/download.py16
-rwxr-xr-xinfra/bots/assets/clang_linux/upload.py16
-rw-r--r--infra/bots/recipe_modules/flavor/gn_flavor.py10
-rw-r--r--infra/bots/recipes/swarm_compile.expected/Build-Mac-Clang-x86_64-Release-GN.json204
-rw-r--r--infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-x86_64-Debug-GN.json2
-rw-r--r--infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-GCC-x86_64-Debug-GN.json2
-rw-r--r--infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE.json2
-rw-r--r--infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-GCC-x86_64-Release-Fast.json2
-rw-r--r--infra/bots/recipes/swarm_compile.expected/Build-Win-MSVC-x86-Release-GN.json2
-rw-r--r--infra/bots/recipes/swarm_compile.py1
-rw-r--r--infra/bots/recipes/swarm_trigger.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN.json12
-rw-r--r--infra/bots/recipes/swarm_trigger.py8
16 files changed, 390 insertions, 10 deletions
diff --git a/infra/bots/assets/clang_linux/VERSION b/infra/bots/assets/clang_linux/VERSION
new file mode 100644
index 0000000000..d8263ee986
--- /dev/null
+++ b/infra/bots/assets/clang_linux/VERSION
@@ -0,0 +1 @@
+2 \ No newline at end of file
diff --git a/infra/bots/assets/clang_linux/common.py b/infra/bots/assets/clang_linux/common.py
new file mode 100755
index 0000000000..4920c9b4fb
--- /dev/null
+++ b/infra/bots/assets/clang_linux/common.py
@@ -0,0 +1,26 @@
+#!/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.
+
+
+"""Common vars used by scripts in this directory."""
+
+
+import os
+import sys
+
+FILE_DIR = os.path.dirname(os.path.abspath(__file__))
+INFRA_BOTS_DIR = os.path.realpath(os.path.join(FILE_DIR, os.pardir, os.pardir))
+
+sys.path.insert(0, INFRA_BOTS_DIR)
+from assets import assets
+
+ASSET_NAME = os.path.basename(FILE_DIR)
+
+
+def run(cmd):
+ """Run a command, eg. "upload" or "download". """
+ assets.main([cmd, ASSET_NAME] + sys.argv[1:])
diff --git a/infra/bots/assets/clang_linux/create.py b/infra/bots/assets/clang_linux/create.py
new file mode 100755
index 0000000000..c72261693c
--- /dev/null
+++ b/infra/bots/assets/clang_linux/create.py
@@ -0,0 +1,54 @@
+#!/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.
+
+
+"""Create a Clang toolchain for Linux hosts."""
+
+
+import argparse
+import os
+import subprocess
+import tempfile
+
+REPO = "https://llvm.googlesource.com/"
+BRANCH = "release_39"
+
+def create_asset(target_dir):
+ os.chdir(tempfile.mkdtemp())
+ subprocess.check_call(["git", "clone", "-b", BRANCH, REPO + "llvm"])
+ os.chdir("llvm/tools")
+ subprocess.check_call(["git", "clone", "-b", BRANCH, REPO + "clang"])
+ os.chdir("../projects")
+ subprocess.check_call(["git", "clone", "-b", BRANCH, REPO + "compiler-rt"])
+ subprocess.check_call(["git", "clone", "-b", BRANCH, REPO + "libcxx"])
+ subprocess.check_call(["git", "clone", "-b", BRANCH, REPO + "libcxxabi"])
+ os.chdir("..")
+ os.mkdir("out")
+ os.chdir("out")
+ subprocess.check_call(["cmake", "..", "-G", "Ninja",
+ "-DCMAKE_BUILD_TYPE=MinSizeRel",
+ "-DCMAKE_INSTALL_PREFIX=" + target_dir,
+ "-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON",
+ "-DLLVM_ENABLE_TERMINFO=OFF"])
+ subprocess.check_call(["cmake", "--build", "."])
+ subprocess.check_call(["cmake", "--build", ".", "--target", "install"])
+ subprocess.check_call(["cp", "bin/llvm-symbolizer", target_dir + "/bin"])
+
+ libstdcpp = subprocess.check_output(["c++",
+ "-print-file-name=libstdc++.so.6"])
+ subprocess.check_call(["cp", libstdcpp.strip(), target_dir + "/lib"])
+
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--target_dir', '-t', required=True)
+ args = parser.parse_args()
+ create_asset(args.target_dir)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/infra/bots/assets/clang_linux/create_and_upload.py b/infra/bots/assets/clang_linux/create_and_upload.py
new file mode 100755
index 0000000000..1356447477
--- /dev/null
+++ b/infra/bots/assets/clang_linux/create_and_upload.py
@@ -0,0 +1,42 @@
+#!/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.
+
+
+"""Create the asset and upload it."""
+
+
+import argparse
+import common
+import os
+import subprocess
+import sys
+import utils
+
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--gsutil')
+ args = parser.parse_args()
+
+ with utils.tmp_dir():
+ cwd = os.getcwd()
+ create_script = os.path.join(common.FILE_DIR, 'create.py')
+ upload_script = os.path.join(common.FILE_DIR, 'upload.py')
+
+ try:
+ subprocess.check_call(['python', create_script, '-t', cwd])
+ cmd = ['python', upload_script, '-t', cwd]
+ if args.gsutil:
+ cmd.extend(['--gsutil', args.gsutil])
+ subprocess.check_call(cmd)
+ except subprocess.CalledProcessError:
+ # Trap exceptions to avoid printing two stacktraces.
+ sys.exit(1)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/infra/bots/assets/clang_linux/download.py b/infra/bots/assets/clang_linux/download.py
new file mode 100755
index 0000000000..96cc87d43f
--- /dev/null
+++ b/infra/bots/assets/clang_linux/download.py
@@ -0,0 +1,16 @@
+#!/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.
+
+
+"""Download the current version of the asset."""
+
+
+import common
+
+
+if __name__ == '__main__':
+ common.run('download')
diff --git a/infra/bots/assets/clang_linux/upload.py b/infra/bots/assets/clang_linux/upload.py
new file mode 100755
index 0000000000..ba7fc8b6a1
--- /dev/null
+++ b/infra/bots/assets/clang_linux/upload.py
@@ -0,0 +1,16 @@
+#!/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.
+
+
+"""Upload a new version of the asset."""
+
+
+import common
+
+
+if __name__ == '__main__':
+ common.run('upload')
diff --git a/infra/bots/recipe_modules/flavor/gn_flavor.py b/infra/bots/recipe_modules/flavor/gn_flavor.py
index cba72a8467..66497b5d58 100644
--- a/infra/bots/recipe_modules/flavor/gn_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_flavor.py
@@ -20,11 +20,15 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
compiler = self.m.vars.builder_cfg.get('compiler', '')
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', '')
cc, cxx = 'cc', 'c++'
extra_cflags = []
- if compiler == 'Clang':
+ if compiler == 'Clang' and os == 'Ubuntu':
+ cc = self.m.vars.slave_dir.join('clang_linux', 'bin', 'clang')
+ cxx = self.m.vars.slave_dir.join('clang_linux', 'bin', 'clang++')
+ elif compiler == 'Clang':
cc, cxx = 'clang', 'clang++'
elif compiler == 'GCC':
cc, cxx = 'gcc', 'g++'
@@ -43,13 +47,13 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
extra_cflags.append('-D' + extra_config)
quote = lambda x: '"%s"' % x
- gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in {
+ gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in sorted({
'cc': quote(cc),
'cxx': quote(cxx),
'compiler_prefix': quote(compiler_prefix),
'extra_cflags': quote(' '.join(extra_cflags)),
'is_debug': 'true' if configuration == 'Debug' else 'false',
- }.iteritems())
+ }.iteritems()))
run = lambda title, cmd: self.m.run(self.m.step, title, cmd=cmd,
cwd=self.m.vars.skia_dir, **kwargs)
diff --git a/infra/bots/recipes/swarm_compile.expected/Build-Mac-Clang-x86_64-Release-GN.json b/infra/bots/recipes/swarm_compile.expected/Build-Mac-Clang-x86_64-Release-GN.json
new file mode 100644
index 0000000000..ace1e585c9
--- /dev/null
+++ b/infra/bots/recipes/swarm_compile.expected/Build-Mac-Clang-x86_64-Release-GN.json
@@ -0,0 +1,204 @@
+[
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n",
+ "[CUSTOM_/_B_WORK]",
+ "511"
+ ],
+ "name": "makedirs checkout_path",
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@python.inline@@@@",
+ "@@@STEP_LOG_LINE@python.inline@import sys, os@@@",
+ "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@",
+ "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@",
+ "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@",
+ "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(path):@@@",
+ "@@@STEP_LOG_LINE@python.inline@ print \"%s exists but is not a dir\" % path@@@",
+ "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@",
+ "@@@STEP_LOG_LINE@python.inline@ os.makedirs(path, mode)@@@",
+ "@@@STEP_LOG_END@python.inline@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
+ "config",
+ "--spec",
+ "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': 'DEPS', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]\ntarget_os = ['llvm']"
+ ],
+ "cwd": "[CUSTOM_/_B_WORK]",
+ "env": {
+ "BUILDTYPE": "Release",
+ "CHROME_HEADLESS": "1",
+ "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
+ "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Release-GN"
+ },
+ "name": "gclient setup"
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
+ "sync",
+ "--nohooks",
+ "--force",
+ "--verbose",
+ "--delete_unversioned_trees",
+ "--revision",
+ "skia@abc123",
+ "--output-json",
+ "/path/to/tmp/json"
+ ],
+ "cwd": "[CUSTOM_/_B_WORK]",
+ "env": {
+ "BUILDTYPE": "Release",
+ "CHROME_HEADLESS": "1",
+ "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]",
+ "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Release-GN"
+ },
+ "name": "gclient sync",
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"solutions\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"skia/\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"revision\": 164710@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@",
+ "@@@SET_BUILD_PROPERTY@got_revision@164710@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "import json\nimport subprocess\nimport sys\n\nccache = None\ntry:\n ccache = subprocess.check_output(['which', 'ccache']).rstrip()\nexcept:\n pass\nprint json.dumps({'ccache': ccache})\n"
+ ],
+ "env": {
+ "BUILDTYPE": "Release",
+ "CHROME_HEADLESS": "1",
+ "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]",
+ "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Release-GN"
+ },
+ "name": "has ccache?",
+ "stdout": "/path/to/tmp/json",
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"ccache\": \"/usr/bin/ccache\"@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@",
+ "@@@STEP_LOG_LINE@python.inline@import json@@@",
+ "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
+ "@@@STEP_LOG_LINE@python.inline@import sys@@@",
+ "@@@STEP_LOG_LINE@python.inline@@@@",
+ "@@@STEP_LOG_LINE@python.inline@ccache = None@@@",
+ "@@@STEP_LOG_LINE@python.inline@try:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ ccache = subprocess.check_output(['which', 'ccache']).rstrip()@@@",
+ "@@@STEP_LOG_LINE@python.inline@except:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ pass@@@",
+ "@@@STEP_LOG_LINE@python.inline@print json.dumps({'ccache': ccache})@@@",
+ "@@@STEP_LOG_END@python.inline@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn"
+ ],
+ "cwd": "[CUSTOM_/_B_WORK]/skia",
+ "env": {
+ "BUILDTYPE": "Release",
+ "CC": "/usr/bin/clang",
+ "CHROME_HEADLESS": "1",
+ "CXX": "/usr/bin/clang++",
+ "GYP_DEFINES": "skia_arch_type=x86_64 skia_clang_build=1 skia_warnings_as_errors=1",
+ "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]",
+ "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Release-GN"
+ },
+ "name": "fetch-gn"
+ },
+ {
+ "cmd": [
+ "gn",
+ "gen",
+ "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Release-GN/Release",
+ "--args=cc=\"clang\" compiler_prefix=\"/usr/bin/ccache\" cxx=\"clang++\" extra_cflags=\"-Qunused-arguments\" is_debug=false"
+ ],
+ "cwd": "[CUSTOM_/_B_WORK]/skia",
+ "env": {
+ "BUILDTYPE": "Release",
+ "CC": "/usr/bin/clang",
+ "CHROME_HEADLESS": "1",
+ "CXX": "/usr/bin/clang++",
+ "GYP_DEFINES": "skia_arch_type=x86_64 skia_clang_build=1 skia_warnings_as_errors=1",
+ "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]",
+ "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Release-GN"
+ },
+ "name": "gn gen"
+ },
+ {
+ "cmd": [
+ "ninja",
+ "-C",
+ "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Release-GN/Release"
+ ],
+ "cwd": "[CUSTOM_/_B_WORK]/skia",
+ "env": {
+ "BUILDTYPE": "Release",
+ "CC": "/usr/bin/clang",
+ "CHROME_HEADLESS": "1",
+ "CXX": "/usr/bin/clang++",
+ "GYP_DEFINES": "skia_arch_type=x86_64 skia_clang_build=1 skia_warnings_as_errors=1",
+ "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]",
+ "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Release-GN"
+ },
+ "name": "ninja"
+ },
+ {
+ "cmd": [
+ "python",
+ "-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",
+ "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Release-GN/Release",
+ "[CUSTOM_[SWARM_OUT_DIR]]/out/Release"
+ ],
+ "name": "copy build products",
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@python.inline@import errno@@@",
+ "@@@STEP_LOG_LINE@python.inline@import glob@@@",
+ "@@@STEP_LOG_LINE@python.inline@import os@@@",
+ "@@@STEP_LOG_LINE@python.inline@import shutil@@@",
+ "@@@STEP_LOG_LINE@python.inline@import sys@@@",
+ "@@@STEP_LOG_LINE@python.inline@@@@",
+ "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@",
+ "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@",
+ "@@@STEP_LOG_LINE@python.inline@build_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']@@@",
+ "@@@STEP_LOG_LINE@python.inline@@@@",
+ "@@@STEP_LOG_LINE@python.inline@try:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@",
+ "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ raise@@@",
+ "@@@STEP_LOG_LINE@python.inline@@@@",
+ "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@",
+ "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@",
+ "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@",
+ "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@",
+ "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@",
+ "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@",
+ "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@",
+ "@@@STEP_LOG_END@python.inline@@@"
+ ]
+ },
+ {
+ "name": "$result",
+ "recipe_result": null,
+ "status_code": 0
+ }
+] \ No newline at end of file
diff --git a/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-x86_64-Debug-GN.json b/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-x86_64-Debug-GN.json
index 35c21ce889..d1eafada2f 100644
--- a/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-x86_64-Debug-GN.json
+++ b/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-x86_64-Debug-GN.json
@@ -127,7 +127,7 @@
"gn",
"gen",
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Debug-GN/Debug",
- "--args=cc=\"clang\" cxx=\"clang++\" is_debug=true extra_cflags=\"-Qunused-arguments\" compiler_prefix=\"/usr/bin/ccache\""
+ "--args=cc=\"[SLAVE_BUILD]/clang_linux/bin/clang\" compiler_prefix=\"/usr/bin/ccache\" cxx=\"[SLAVE_BUILD]/clang_linux/bin/clang++\" extra_cflags=\"-Qunused-arguments\" is_debug=true"
],
"cwd": "[CUSTOM_/_B_WORK]/skia",
"env": {
diff --git a/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-GCC-x86_64-Debug-GN.json b/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-GCC-x86_64-Debug-GN.json
index 253f918399..1f3b7727ac 100644
--- a/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-GCC-x86_64-Debug-GN.json
+++ b/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-GCC-x86_64-Debug-GN.json
@@ -125,7 +125,7 @@
"gn",
"gen",
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-GN/Debug",
- "--args=cc=\"gcc\" cxx=\"g++\" is_debug=true extra_cflags=\"\" compiler_prefix=\"/usr/bin/ccache\""
+ "--args=cc=\"gcc\" compiler_prefix=\"/usr/bin/ccache\" cxx=\"g++\" extra_cflags=\"\" is_debug=true"
],
"cwd": "[CUSTOM_/_B_WORK]/skia",
"env": {
diff --git a/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE.json b/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE.json
index 090d312016..abae3fa4fc 100644
--- a/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE.json
+++ b/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE.json
@@ -124,7 +124,7 @@
"gn",
"gen",
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE/Debug",
- "--args=cc=\"gcc\" cxx=\"g++\" is_debug=true extra_cflags=\"-DSK_USE_DISCARDABLE_SCALEDIMAGECACHE\" compiler_prefix=\"\""
+ "--args=cc=\"gcc\" compiler_prefix=\"\" cxx=\"g++\" extra_cflags=\"-DSK_USE_DISCARDABLE_SCALEDIMAGECACHE\" is_debug=true"
],
"cwd": "[CUSTOM_/_B_WORK]/skia",
"env": {
diff --git a/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-GCC-x86_64-Release-Fast.json b/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-GCC-x86_64-Release-Fast.json
index 10321f6f9a..cf1a1a97f0 100644
--- a/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-GCC-x86_64-Release-Fast.json
+++ b/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-GCC-x86_64-Release-Fast.json
@@ -123,7 +123,7 @@
"gn",
"gen",
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Release-Fast/Release",
- "--args=cc=\"gcc\" cxx=\"g++\" is_debug=false extra_cflags=\"-march=native -fomit-frame-pointer -O3\" compiler_prefix=\"\""
+ "--args=cc=\"gcc\" compiler_prefix=\"\" cxx=\"g++\" extra_cflags=\"-march=native -fomit-frame-pointer -O3\" is_debug=false"
],
"cwd": "[CUSTOM_/_B_WORK]/skia",
"env": {
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 62b59e92c8..1472cb72af 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
@@ -93,7 +93,7 @@
"gn",
"gen",
"[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Release-GN\\Release",
- "--args=cc=\"cc\" cxx=\"c++\" is_debug=false extra_cflags=\"\" compiler_prefix=\"\""
+ "--args=cc=\"cc\" compiler_prefix=\"\" cxx=\"c++\" extra_cflags=\"\" is_debug=false"
],
"cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
"env": {
diff --git a/infra/bots/recipes/swarm_compile.py b/infra/bots/recipes/swarm_compile.py
index 8d7209016b..aef67d95a4 100644
--- a/infra/bots/recipes/swarm_compile.py
+++ b/infra/bots/recipes/swarm_compile.py
@@ -27,6 +27,7 @@ TEST_BUILDERS = {
'Build-Mac-Clang-mipsel-Debug-GN_Android',
'Build-Mac-Clang-x86_64-Debug-CommandBuffer',
'Build-Mac-Clang-x86_64-Release-CMake',
+ 'Build-Mac-Clang-x86_64-Release-GN',
'Build-Ubuntu-Clang-arm64-Release-GN_Android',
'Build-Ubuntu-Clang-x86_64-Debug-GN',
'Build-Ubuntu-GCC-Arm7-Debug-Android-Trybot',
diff --git a/infra/bots/recipes/swarm_trigger.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN.json b/infra/bots/recipes/swarm_trigger.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN.json
index c2ce4b9118..1e89de0b57 100644
--- a/infra/bots/recipes/swarm_trigger.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN.json
+++ b/infra/bots/recipes/swarm_trigger.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN.json
@@ -261,6 +261,16 @@
"cmd": [
"python",
"-u",
+ "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
+ "[SLAVE_BUILD]/skia/infra/bots/assets/clang_linux/VERSION",
+ "/path/to/tmp/"
+ ],
+ "name": "read clang_linux VERSION"
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
"\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n if os.path.exists(path):\n print \"%s exists but is not a dir\" % path\n sys.exit(1)\n os.makedirs(path, mode)\n",
"[SLAVE_BUILD]/swarming_temp_dir",
"511"
@@ -366,6 +376,8 @@
"--tag",
"stepname:compile_skia on Ubuntu",
"--idempotent",
+ "--cipd-package",
+ "clang_linux:skia/bots/clang_linux:version:0",
"[dummy hash for compile_skia]",
"--",
"--workdir",
diff --git a/infra/bots/recipes/swarm_trigger.py b/infra/bots/recipes/swarm_trigger.py
index f512f770d6..7b3bf9eb47 100644
--- a/infra/bots/recipes/swarm_trigger.py
+++ b/infra/bots/recipes/swarm_trigger.py
@@ -354,13 +354,17 @@ def compile_steps_swarm(api, builder_cfg, got_revision, infrabots_dir):
cipd_packages = []
# Android bots require a toolchain.
- if 'Android' in api.properties['buildername']:
+ if 'Android' in builder_name:
cipd_packages.append(cipd_pkg(api, infrabots_dir, 'android_sdk'))
- if 'Mac' in api.properties['buildername']:
+ if 'Mac' in builder_name:
cipd_packages.append(cipd_pkg(api, infrabots_dir, 'android_ndk_darwin'))
else:
cipd_packages.append(cipd_pkg(api, infrabots_dir, 'android_ndk_linux'))
+ if 'Ubuntu' in builder_name and (
+ 'SAN' in builder_name or 'Clang' in builder_name):
+ cipd_packages.append(cipd_pkg(api, infrabots_dir, 'clang_linux'))
+
# Windows bots require a toolchain.
if 'Win' in builder_name:
version_file = infrabots_dir.join('assets', 'win_toolchain', 'VERSION')