Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: infra/bots/recipe_modules/flavor/gn_flavor.py

Issue 2472343003: Improvements to build_command_buffer.py (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | infra/bots/recipes/swarm_compile.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import default_flavor 5 import default_flavor
6 6
7 """GN flavor utils, used for building Skia with GN.""" 7 """GN flavor utils, used for building Skia with GN."""
8 class GNFlavorUtils(default_flavor.DefaultFlavorUtils): 8 class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
9 def _strip_environment(self): 9 def _strip_environment(self):
10 self.m.vars.default_env = {k: v for (k,v) 10 self.m.vars.default_env = {k: v for (k,v)
11 in self.m.vars.default_env.iteritems() 11 in self.m.vars.default_env.iteritems()
12 if k in ['PATH']} 12 if k in ['PATH']}
13 13
14 def _run(self, title, cmd, env=None, infra_step=False): 14 def _run(self, title, cmd, env=None, infra_step=False):
15 self._strip_environment() 15 self._strip_environment()
16 self.m.run(self.m.step, title, cmd=cmd, 16 self.m.run(self.m.step, title, cmd=cmd,
17 env=env, cwd=self.m.vars.skia_dir, infra_step=infra_step) 17 env=env, cwd=self.m.vars.skia_dir, infra_step=infra_step)
18 18
19 def _py(self, title, script, env=None, infra_step=True): 19 def _py(self, title, script, env=None, infra_step=True):
20 self._strip_environment() 20 self._strip_environment()
21 self.m.run(self.m.python, title, script=script, 21 self.m.run(self.m.python, title, script=script,
22 env=env, cwd=self.m.vars.skia_dir, infra_step=infra_step) 22 env=env, cwd=self.m.vars.skia_dir, infra_step=infra_step)
23 23
24 def build_command_buffer(self): 24 def build_command_buffer(self):
25 self.m.run(self.m.python, 'build command_buffer', 25 self.m.run(self.m.python, 'build command_buffer',
26 script=self.m.vars.skia_dir.join('tools', 'build_command_buffer.py'), 26 script=self.m.vars.skia_dir.join('tools', 'build_command_buffer.py'),
27 args=[ 27 args=[
28 '--chrome-dir', self.m.vars.checkout_root, 28 '--chrome-dir', self.m.vars.checkout_root,
29 '--output-dir', self.m.vars.skia_out.join(self.m.vars.configuration), 29 '--output-dir', self.m.vars.skia_out.join(self.m.vars.configuration),
30 '--chrome-build-type', self.m.vars.configuration,
bsalomon 2016/11/04 15:38:50 Now the bots use the new default output dir for th
31 '--no-sync', '--make-output-dir']) 30 '--no-sync', '--make-output-dir'])
32 31
33 def compile(self, unused_target, **kwargs): 32 def compile(self, unused_target, **kwargs):
34 """Build Skia with GN.""" 33 """Build Skia with GN."""
35 compiler = self.m.vars.builder_cfg.get('compiler', '') 34 compiler = self.m.vars.builder_cfg.get('compiler', '')
36 configuration = self.m.vars.builder_cfg.get('configuration', '') 35 configuration = self.m.vars.builder_cfg.get('configuration', '')
37 extra_config = self.m.vars.builder_cfg.get('extra_config', '') 36 extra_config = self.m.vars.builder_cfg.get('extra_config', '')
38 os = self.m.vars.builder_cfg.get('os', '') 37 os = self.m.vars.builder_cfg.get('os', '')
39 target_arch = self.m.vars.builder_cfg.get('target_arch', '') 38 target_arch = self.m.vars.builder_cfg.get('target_arch', '')
40 39
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 if 'ASAN' == extra_config: 138 if 'ASAN' == extra_config:
140 env[ 'ASAN_OPTIONS'] = 'symbolize=1 detect_leaks=1' 139 env[ 'ASAN_OPTIONS'] = 'symbolize=1 detect_leaks=1'
141 env[ 'LSAN_OPTIONS'] = 'symbolize=1 print_suppressions=1' 140 env[ 'LSAN_OPTIONS'] = 'symbolize=1 print_suppressions=1'
142 env['UBSAN_OPTIONS'] = 'symbolize=1 print_stacktrace=1' 141 env['UBSAN_OPTIONS'] = 'symbolize=1 print_stacktrace=1'
143 142
144 if 'MSAN' == extra_config: 143 if 'MSAN' == extra_config:
145 # Find the MSAN-built libc++. 144 # Find the MSAN-built libc++.
146 env['LD_LIBRARY_PATH'] = clang_linux + '/msan' 145 env['LD_LIBRARY_PATH'] = clang_linux + '/msan'
147 146
148 self._run(name, cmd, env=env) 147 self._run(name, cmd, env=env)
OLDNEW
« no previous file with comments | « no previous file | infra/bots/recipes/swarm_compile.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698