OLD | NEW |
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 supported(self): | 9 def supported(self): |
10 extra_config = self.m.vars.builder_cfg.get('extra_config', '') | 10 extra_config = self.m.vars.builder_cfg.get('extra_config', '') |
11 os = self.m.vars.builder_cfg.get('os', '') | 11 os = self.m.vars.builder_cfg.get('os', '') |
12 target_arch = self.m.vars.builder_cfg.get('target_arch', '') | 12 target_arch = self.m.vars.builder_cfg.get('target_arch', '') |
13 | 13 |
14 return any([ | 14 return any([ |
| 15 'CT' in extra_config, |
15 'SAN' in extra_config, | 16 'SAN' in extra_config, |
16 extra_config == 'Fast', | 17 extra_config == 'Fast', |
17 extra_config == 'GN', | 18 extra_config == 'GN', |
18 extra_config.startswith('SK'), | 19 extra_config.startswith('SK'), |
19 os == 'Ubuntu' and target_arch == 'x86', | 20 os == 'Ubuntu' and target_arch == 'x86', |
20 ]) | 21 ]) |
21 | 22 |
22 def _run(self, title, cmd, env=None, infra_step=False): | 23 def _run(self, title, cmd, env=None, infra_step=False): |
23 self.m.vars.default_env = {k: v for (k,v) | 24 self.m.vars.default_env = {k: v for (k,v) |
24 in self.m.vars.default_env.iteritems() | 25 in self.m.vars.default_env.iteritems() |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 if 'ASAN' == extra_config: | 99 if 'ASAN' == extra_config: |
99 env[ 'ASAN_OPTIONS'] = 'symbolize=1 detect_leaks=1' | 100 env[ 'ASAN_OPTIONS'] = 'symbolize=1 detect_leaks=1' |
100 env[ 'LSAN_OPTIONS'] = 'symbolize=1 print_suppressions=1' | 101 env[ 'LSAN_OPTIONS'] = 'symbolize=1 print_suppressions=1' |
101 env['UBSAN_OPTIONS'] = 'symbolize=1 print_stacktrace=1' | 102 env['UBSAN_OPTIONS'] = 'symbolize=1 print_stacktrace=1' |
102 | 103 |
103 if 'MSAN' == extra_config: | 104 if 'MSAN' == extra_config: |
104 # Find the MSAN-built libc++. | 105 # Find the MSAN-built libc++. |
105 env['LD_LIBRARY_PATH'] = clang_linux + '/msan' | 106 env['LD_LIBRARY_PATH'] = clang_linux + '/msan' |
106 | 107 |
107 self._run(name, cmd, env=env) | 108 self._run(name, cmd, env=env) |
OLD | NEW |