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

Unified Diff: scripts/slave/recipe_modules/ios/api.py

Issue 2133483002: Fix configuration of goma in iOS recipes. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | scripts/slave/recipes/ios/try.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | scripts/slave/recipes/ios/try.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698