| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 cfg = self.m.chromium.make_config() | 224 cfg = self.m.chromium.make_config() |
| 225 | 225 |
| 226 if self.using_gyp: | 226 if self.using_gyp: |
| 227 cfg.gyp_env.GYP_CROSSCOMPILE = 1 | 227 cfg.gyp_env.GYP_CROSSCOMPILE = 1 |
| 228 if isinstance(self.__config['GYP_DEFINES'], dict): | 228 if isinstance(self.__config['GYP_DEFINES'], dict): |
| 229 cfg.gyp_env.GYP_DEFINES = copy.deepcopy(self.__config['GYP_DEFINES']) | 229 cfg.gyp_env.GYP_DEFINES = copy.deepcopy(self.__config['GYP_DEFINES']) |
| 230 else: | 230 else: |
| 231 cfg.gyp_env.GYP_DEFINES = dict(v.split('=') for | 231 cfg.gyp_env.GYP_DEFINES = dict(v.split('=') for |
| 232 v in self.__config['GYP_DEFINES']) | 232 v in self.__config['GYP_DEFINES']) |
| 233 self.m.chromium.c = cfg | 233 self.m.chromium.c = cfg |
| 234 self.m.chromium.apply_config('force_mac_toolchain_off') |
| 234 | 235 |
| 235 use_goma = (cfg.gyp_env.GYP_DEFINES.get('use_goma') == '1' or | 236 use_goma = (cfg.gyp_env.GYP_DEFINES.get('use_goma') == '1' or |
| 236 'use_goma=true' in self.__config['gn_args']) | 237 'use_goma=true' in self.__config['gn_args']) |
| 237 if use_goma: | 238 if use_goma: |
| 238 # Make sure these chromium configs are applied consistently for the | 239 # Make sure these chromium configs are applied consistently for the |
| 239 # rest of the recipe; they are needed in order for m.chromium.compile() | 240 # rest of the recipe; they are needed in order for m.chromium.compile() |
| 240 # to work correctly. | 241 # to work correctly. |
| 241 self.m.chromium.apply_config('ninja') | 242 self.m.chromium.apply_config('ninja') |
| 242 self.m.chromium.apply_config('default_compiler') | 243 self.m.chromium.apply_config('default_compiler') |
| 243 self.m.chromium.apply_config('goma') | 244 self.m.chromium.apply_config('goma') |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 @property | 811 @property |
| 811 def most_recent_iossim(self): | 812 def most_recent_iossim(self): |
| 812 """Returns the path to the most recently compiled iossim.""" | 813 """Returns the path to the most recently compiled iossim.""" |
| 813 platform = { | 814 platform = { |
| 814 'device': 'iphoneos', | 815 'device': 'iphoneos', |
| 815 'simulator': 'iphonesimulator', | 816 'simulator': 'iphonesimulator', |
| 816 }[self.platform] | 817 }[self.platform] |
| 817 | 818 |
| 818 return self.m.path.join( | 819 return self.m.path.join( |
| 819 'src', 'out', '%s-%s' % (self.configuration, platform), 'iossim') | 820 'src', 'out', '%s-%s' % (self.configuration, platform), 'iossim') |
| OLD | NEW |