Chromium Code Reviews| Index: scripts/slave/recipe_modules/ios/api.py |
| diff --git a/scripts/slave/recipe_modules/ios/api.py b/scripts/slave/recipe_modules/ios/api.py |
| index 878bedf58cf46d1a629ea3ca6e9e86459314da13..2370ed927b6e187d415b5e82f962e4a6275a8a47 100644 |
| --- a/scripts/slave/recipe_modules/ios/api.py |
| +++ b/scripts/slave/recipe_modules/ios/api.py |
| @@ -213,9 +213,27 @@ class iOSApi(recipe_api.RecipeApi): |
| if self.using_gyp: |
| cfg.gyp_env.GYP_CROSSCOMPILE = 1 |
| - cfg.gyp_env.GYP_DEFINES = copy.deepcopy(self.__config['GYP_DEFINES']) |
| + if isinstance(self.__config['GYP_DEFINES'], dict): |
| + cfg.gyp_env.GYP_DEFINES = copy.deepcopy(self.__config['GYP_DEFINES']) |
| + else: |
| + cfg.gyp_env.GYP_DEFINES = dict(v.split('=') for |
| + v in self.__config['GYP_DEFINES']) |
| self.m.chromium.c = cfg |
| + use_goma = (self.compiler == 'ninja' and |
| + (cfg.gyp_env.GYP_DEFINES.get('goma') == '1' or |
| + 'use_goma=true' in self.__config['gn_args'])) |
| + if use_goma: |
|
smut
2016/07/07 22:58:28
Do we need the "if 'without patch' not in suffix"
Dirk Pranke
2016/07/07 23:05:36
This block is moved from build() to read_build_con
|
| + # Make sure these chromium configs are applied consistently for the |
| + # rest of the recipe. |
|
Dirk Pranke
2016/07/07 23:05:36
These are needed for m.chromium.compile() to work
|
| + self.m.chromium.apply_config('ninja') |
| + self.m.chromium.apply_config('default_compiler') |
| + self.m.chromium.apply_config('goma') |
| + |
| + # Calling ensure_goma() after apply_config('goma') make sure that |
| + # we gett the right c.compile_py.goma_dir . |
|
smut
2016/07/07 22:58:28
s/gett/get/
Dirk Pranke
2016/07/07 23:05:58
Done.
|
| + self.m.chromium.ensure_goma() |
| + |
| def build(self, mb_config_path=None, suffix=None): |
| """Builds from this bot's build config.""" |
| assert self.__config is not None |
| @@ -326,15 +344,6 @@ class iOSApi(recipe_api.RecipeApi): |
| use_goma = (self.compiler == 'ninja' and |
| ('use_goma=1' in gyp_defines or 'use_goma=true' in gn_args)) |
| if use_goma: |
| - if 'without patch' not in suffix: |
| - # TODO(crbug.com/603641): |
| - # Configs aren't deapplied, so we only want to apply these |
| - # configs once. Really, we should refactor this so that we're |
| - # not applying configs at all in build(), but rather do it |
| - # in an earlier step. |
| - self.m.chromium.apply_config('ninja') |
| - self.m.chromium.apply_config('default_compiler') |
| - self.m.chromium.apply_config('goma') |
| self.m.chromium.compile(targets=compile_targets, |
| target=build_sub_path, |
| cwd=cwd) |