OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 copy | 5 import copy |
6 | 6 |
7 from recipe_engine import recipe_api | 7 from recipe_engine import recipe_api |
8 | 8 |
9 | 9 |
10 class iOSApi(recipe_api.RecipeApi): | 10 class iOSApi(recipe_api.RecipeApi): |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 self.m.chromium.apply_config('ninja') | 253 self.m.chromium.apply_config('ninja') |
254 self.m.chromium.apply_config('default_compiler') | 254 self.m.chromium.apply_config('default_compiler') |
255 self.m.chromium.apply_config('goma') | 255 self.m.chromium.apply_config('goma') |
256 | 256 |
257 # apply_config('goma') sets the old (wrong) directory for goma in | 257 # apply_config('goma') sets the old (wrong) directory for goma in |
258 # chromium.c.compile_py.goma_dir, but calling ensure_goma() after | 258 # chromium.c.compile_py.goma_dir, but calling ensure_goma() after |
259 # that fixes things, and makes sure that goma is actually | 259 # that fixes things, and makes sure that goma is actually |
260 # available as well. | 260 # available as well. |
261 self.m.chromium.ensure_goma() | 261 self.m.chromium.ensure_goma() |
262 | 262 |
263 def build(self, mb_config_path=None, suffix=None): | 263 def build(self, mb_config_path=None, gyp_script=None, suffix=None): |
264 """Builds from this bot's build config.""" | 264 """Builds from this bot's build config.""" |
265 assert self.__config is not None | 265 assert self.__config is not None |
266 | 266 |
267 suffix = ' (%s)' % suffix if suffix else '' | 267 suffix = ' (%s)' % suffix if suffix else '' |
268 | 268 |
269 if self.using_mb: | 269 if self.using_mb: |
270 self.m.chromium.c.project_generator.tool = 'mb' | 270 self.m.chromium.c.project_generator.tool = 'mb' |
271 | 271 |
272 # Add the default GYP_DEFINES. | 272 # Add the default GYP_DEFINES. |
273 if isinstance(self.__config['GYP_DEFINES'], dict): | 273 if isinstance(self.__config['GYP_DEFINES'], dict): |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 '<br />GYP_DEFINES:<br />%s' % '<br />'.join(gyp_defines) | 326 '<br />GYP_DEFINES:<br />%s' % '<br />'.join(gyp_defines) |
327 ) | 327 ) |
328 if self.using_mb: | 328 if self.using_mb: |
329 step_result.presentation.step_text += '<br />GYP_CHROMIUM_NO_ACTION=1' | 329 step_result.presentation.step_text += '<br />GYP_CHROMIUM_NO_ACTION=1' |
330 | 330 |
331 if self.using_mb: | 331 if self.using_mb: |
332 self.m.chromium.run_mb(self.__config['mastername'], | 332 self.m.chromium.run_mb(self.__config['mastername'], |
333 self.m.properties['buildername'], | 333 self.m.properties['buildername'], |
334 name='generate_build_files' + suffix, | 334 name='generate_build_files' + suffix, |
335 mb_config_path=mb_config_path, | 335 mb_config_path=mb_config_path, |
| 336 gyp_script=gyp_script, |
336 build_dir='//out/' + build_sub_path) | 337 build_dir='//out/' + build_sub_path) |
337 | 338 |
338 use_analyze = self.__config['use_analyze'] | 339 use_analyze = self.__config['use_analyze'] |
339 if (use_analyze and | 340 if (use_analyze and |
340 self.compiler == 'ninja' and | 341 self.compiler == 'ninja' and |
341 self.m.tryserver.is_tryserver and | 342 self.m.tryserver.is_tryserver and |
342 'without patch' not in suffix): | 343 'without patch' not in suffix): |
343 affected_files = self.m.chromium_tests.get_files_affected_by_patch( | 344 affected_files = self.m.chromium_tests.get_files_affected_by_patch( |
344 cwd=self.m.path['checkout']) | 345 cwd=self.m.path['checkout']) |
345 # The same test may be configured to run on multiple simulators. | 346 # The same test may be configured to run on multiple simulators. |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 build_dir, | 762 build_dir, |
762 self.configuration, | 763 self.configuration, |
763 'iossim', | 764 'iossim', |
764 ), | 765 ), |
765 'ninja': self.m.path['checkout'].join( | 766 'ninja': self.m.path['checkout'].join( |
766 build_dir, | 767 build_dir, |
767 '%s-%s' % (self.configuration, platform), | 768 '%s-%s' % (self.configuration, platform), |
768 'iossim', | 769 'iossim', |
769 ), | 770 ), |
770 }[self.compiler] | 771 }[self.compiler] |
OLD | NEW |