Bug 1542963 - Fix undefined var 'defines' when use_defines_in_asflags is set. r=#build
☠☠ backed out by cd02c0486c2e ☠ ☠
authorJustin Wood <Callek@gmail.com>
Sun, 07 Apr 2019 15:40:55 -0400
changeset 474130 14aa1bd254a48f74c05fccc4be7df847135ec090
parent 474129 11a714f491d56eb86b131505b12b9db240249179
child 474131 a1a84e0feabbaf28257547dfecec84ddd72f0b61
push id36023
push userncsoregi@mozilla.com
push dateThu, 16 May 2019 21:56:43 +0000
treeherdermozilla-central@786f094a30ae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1542963
milestone68.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
Bug 1542963 - Fix undefined var 'defines' when use_defines_in_asflags is set. r=#build Lint python/mozbuild/{mozbuild,mozpack}. Differential Revision: https://phabricator.services.mozilla.com/D26642
python/mozbuild/mozbuild/gn_processor.py
--- a/python/mozbuild/mozbuild/gn_processor.py
+++ b/python/mozbuild/mozbuild/gn_processor.py
@@ -272,18 +272,18 @@ def process_gn_config(gn_config, srcdir,
                     print("Included path: '%s' does not exist, dropping include from GN "
                           "configuration." % resolved, file=sys.stderr)
                 continue
             if not include.startswith('/'):
                 include = '/%s/%s' % (project_relsrcdir, include)
             context_attrs['LOCAL_INCLUDES'] += [include]
 
         context_attrs['ASFLAGS'] = spec.get('asflags_mozilla', [])
-        if use_defines_in_asflags and defines:
-            context_attrs['ASFLAGS'] += ['-D' + d for d in defines]
+        if use_defines_in_asflags and context_attrs['DEFINES']:
+            context_attrs['ASFLAGS'] += ['-D' + d for d in context_attrs['DEFINES']]
         flags = [_f for _f in spec.get('cflags', []) if _f in mozilla_flags]
         if flags:
             suffix_map = {
                 '.c': 'CFLAGS',
                 '.cpp': 'CXXFLAGS',
                 '.cc': 'CXXFLAGS',
                 '.m': 'CMFLAGS',
                 '.mm': 'CMMFLAGS',