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

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: improve wording in comment 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..f9d4e6cd4df9a8b3397fdb0966a83669941d4c33 100644
--- a/scripts/slave/recipe_modules/ios/api.py
+++ b/scripts/slave/recipe_modules/ios/api.py
@@ -213,9 +213,30 @@ 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('use_goma') == '1' or
+ 'use_goma=true' in self.__config['gn_args']))
+ if use_goma:
+ # Make sure these chromium configs are applied consistently for the
+ # rest of the recipe; they are needed in order for m.chromium.compile()
+ # to work correctly.
+ self.m.chromium.apply_config('ninja')
+ self.m.chromium.apply_config('default_compiler')
+ self.m.chromium.apply_config('goma')
+
+ # apply_config('goma') sets the old (wrong) directory for goma in
+ # chromium.c.compile_py.goma_dir, but calling ensure_goma() after
+ # that fixes things, and makes sure that goma is actually
+ # available as well.
+ 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 +347,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