aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra
diff options
context:
space:
mode:
Diffstat (limited to 'infra')
-rw-r--r--infra/bots/recipe_modules/flavor/gn_flavor.py23
-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
6 files changed, 17 insertions, 16 deletions
diff --git a/infra/bots/recipe_modules/flavor/gn_flavor.py b/infra/bots/recipe_modules/flavor/gn_flavor.py
index ef25896569..75c318f818 100644
--- a/infra/bots/recipe_modules/flavor/gn_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_flavor.py
@@ -21,12 +21,8 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
configuration = self.m.vars.builder_cfg.get('configuration', '')
extra_config = self.m.vars.builder_cfg.get('extra_config', '')
- gn_args = []
- if configuration != 'Debug':
- gn_args.append('is_debug=false')
-
cc, cxx = 'cc', 'c++'
- cflags = []
+ extra_cflags = []
if compiler == 'Clang':
cc, cxx = 'clang', 'clang++'
@@ -38,19 +34,24 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
cc, cxx = '%s %s' % (ccache, cc), '%s %s' % (ccache, cxx)
if compiler == 'Clang':
# Stifle "argument unused during compilation: ..." warnings.
- cflags.append('-Qunused-arguments')
+ extra_cflags.append('-Qunused-arguments')
if extra_config == 'Fast':
- cflags.extend(['-march=native', '-fomit-frame-pointer'])
+ extra_cflags.extend(['-march=native', '-fomit-frame-pointer', '-O3'])
if extra_config.startswith('SK'):
- cflags.append('-D' + extra_config)
+ extra_cflags.append('-D' + extra_config)
- cflags = ' '.join(cflags)
- gn_args += [ 'cc="%s %s"' % (cc, cflags), 'cxx="%s %s"' % (cxx, cflags) ]
+ quote = lambda x: '"%s"' % x
+ gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in {
+ 'cc': quote(cc),
+ 'cxx': quote(cxx),
+ 'extra_cflags': quote(' '.join(extra_cflags)),
+ 'is_debug': 'true' if configuration == 'Debug' else 'false',
+ }.iteritems())
run = lambda title, cmd: self.m.run(self.m.step, title, cmd=cmd,
cwd=self.m.vars.skia_dir, **kwargs)
run('fetch-gn', [self.m.vars.skia_dir.join('bin', 'fetch-gn')])
- run('gn gen', ['gn', 'gen', self.out_dir, '--args=%s' % ' '.join(gn_args)])
+ run('gn gen', ['gn', 'gen', self.out_dir, '--args=' + gn_args])
run('ninja', ['ninja', '-C', self.out_dir])
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 40c9a2b21d..3e3ef0e0bd 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=\"/usr/bin/ccache clang -Qunused-arguments\" cxx=\"/usr/bin/ccache clang++ -Qunused-arguments\""
+ "--args=cc=\"/usr/bin/ccache clang\" cxx=\"/usr/bin/ccache clang++\" is_debug=true extra_cflags=\"-Qunused-arguments\""
],
"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 5ad5558822..10ff8c3307 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=\"/usr/bin/ccache gcc \" cxx=\"/usr/bin/ccache g++ \""
+ "--args=cc=\"/usr/bin/ccache gcc\" cxx=\"/usr/bin/ccache g++\" is_debug=true extra_cflags=\"\""
],
"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 5d0dd78b6d..12314f87cc 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 -DSK_USE_DISCARDABLE_SCALEDIMAGECACHE\" cxx=\"g++ -DSK_USE_DISCARDABLE_SCALEDIMAGECACHE\""
+ "--args=cc=\"gcc\" cxx=\"g++\" is_debug=true extra_cflags=\"-DSK_USE_DISCARDABLE_SCALEDIMAGECACHE\""
],
"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 5dd7797b65..091b29ebb1 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=is_debug=false cc=\"gcc -march=native -fomit-frame-pointer\" cxx=\"g++ -march=native -fomit-frame-pointer\""
+ "--args=cc=\"gcc\" cxx=\"g++\" is_debug=false extra_cflags=\"-march=native -fomit-frame-pointer -O3\""
],
"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 1cd02d0266..fe8c242369 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=is_debug=false cc=\"cc \" cxx=\"c++ \""
+ "--args=cc=\"cc\" cxx=\"c++\" is_debug=false extra_cflags=\"\""
],
"cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
"env": {