☠☠ backed out by 02bd7db82457 ☠ ☠ | |
author | Chris Manchester <cmanchester@mozilla.com> |
Thu, 01 Dec 2016 14:28:55 -0800 | |
changeset 325147 | 9e66e4d7e87d025612472e2549d720631be9e67b |
parent 325146 | 36a7105524b6ed162203431ecced7d0bbf6286f5 |
child 325148 | bbb8642886b817f5cdd643368cde17469e53124c |
push id | 84610 |
push user | philringnalda@gmail.com |
push date | Sat, 03 Dec 2016 06:28:13 +0000 |
treeherder | mozilla-inbound@1b2237e0b5e0 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | gps |
bugs | 1308982 |
milestone | 53.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/python/mozbuild/mozbuild/frontend/gyp_reader.py +++ b/python/mozbuild/mozbuild/frontend/gyp_reader.py @@ -47,70 +47,72 @@ def encode(value): return value # Default variables gyp uses when evaluating gyp files. generator_default_variables = { } for dirname in [b'INTERMEDIATE_DIR', b'SHARED_INTERMEDIATE_DIR', b'PRODUCT_DIR', b'LIB_DIR', b'SHARED_LIB_DIR']: - # Some gyp steps fail if these are empty(!). - generator_default_variables[dirname] = b'$' + dirname + # Some gyp steps fail if these are empty(!). + generator_default_variables[dirname] = b'$' + dirname for unused in ['RULE_INPUT_PATH', 'RULE_INPUT_ROOT', 'RULE_INPUT_NAME', 'RULE_INPUT_DIRNAME', 'RULE_INPUT_EXT', 'EXECUTABLE_PREFIX', 'EXECUTABLE_SUFFIX', 'STATIC_LIB_PREFIX', 'STATIC_LIB_SUFFIX', 'SHARED_LIB_PREFIX', 'SHARED_LIB_SUFFIX', 'LINKER_SUPPORTS_ICF']: - generator_default_variables[unused] = b'' + generator_default_variables[unused] = b'' class GypContext(TemplateContext): """Specialized Context for use with data extracted from Gyp. config is the ConfigEnvironment for this context. relobjdir is the object directory that will be used for this context, relative to the topobjdir defined in the ConfigEnvironment. """ def __init__(self, config, relobjdir): self._relobjdir = relobjdir TemplateContext.__init__(self, template='Gyp', allowed_variables=VARIABLES, config=config) def handle_actions(actions, context, action_overrides): - idir = '$INTERMEDIATE_DIR/' - for action in actions: - name = action['action_name'] - if name not in action_overrides: - raise RuntimeError('GYP action %s not listed in action_overrides' % name) - outputs = action['outputs'] - if len(outputs) > 1: - raise NotImplementedError('GYP actions with more than one output not supported: %s' % name) - output = outputs[0] - if not output.startswith(idir): - raise NotImplementedError('GYP actions outputting to somewhere other than <(INTERMEDIATE_DIR) not supported: %s' % output) - output = output[len(idir):] - context['GENERATED_FILES'] += [output] - g = context['GENERATED_FILES'][output] - g.script = action_overrides[name] - g.inputs = action['inputs'] + idir = '$INTERMEDIATE_DIR/' + for action in actions: + name = action['action_name'] + if name not in action_overrides: + raise RuntimeError('GYP action %s not listed in action_overrides' % name) + outputs = action['outputs'] + if len(outputs) > 1: + raise NotImplementedError('GYP actions with more than one output not supported: %s' % name) + output = outputs[0] + if not output.startswith(idir): + raise NotImplementedError('GYP actions outputting to somewhere other than <(INTERMEDIATE_DIR) not supported: %s' % output) + output = output[len(idir):] + context['GENERATED_FILES'] += [output] + g = context['GENERATED_FILES'][output] + g.script = action_overrides[name] + g.inputs = action['inputs'] + def handle_copies(copies, context): - dist = '$PRODUCT_DIR/dist/' - for copy in copies: - dest = copy['destination'] - if not dest.startswith(dist): - raise NotImplementedError('GYP copies to somewhere other than <(PRODUCT_DIR)/dist not supported: %s' % dest) - dest_paths = dest[len(dist):].split('/') - exports = context['EXPORTS'] - while dest_paths: - exports = getattr(exports, dest_paths.pop(0)) - exports += sorted(copy['files'], key=lambda x: x.lower()) + dist = '$PRODUCT_DIR/dist/' + for copy in copies: + dest = copy['destination'] + if not dest.startswith(dist): + raise NotImplementedError('GYP copies to somewhere other than <(PRODUCT_DIR)/dist not supported: %s' % dest) + dest_paths = dest[len(dist):].split('/') + exports = context['EXPORTS'] + while dest_paths: + exports = getattr(exports, dest_paths.pop(0)) + exports += sorted(copy['files'], key=lambda x: x.lower()) + def read_from_gyp(config, path, output, vars, no_chromium, no_unified, action_overrides, non_unified_sources = set()): """Read a gyp configuration and emits GypContexts for the backend to process. config is a ConfigEnvironment, path is the path to a root gyp configuration file, output is the base path under which the objdir for the various gyp dependencies will be, and vars a dict of variables to pass to the gyp