From f86dd03c235b87e2c82d681199c723a244af6219 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Tue, 28 May 2019 14:22:30 +0000 Subject: [PATCH] Bug 1542963 - Fix undefined var 'defines' when use_defines_in_asflags is set. r=glandium Lint python/mozbuild/{mozbuild,mozpack}. Differential Revision: https://phabricator.services.mozilla.com/D26642 --HG-- extra : moz-landing-system : lando --- python/mozbuild/mozbuild/gn_processor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/mozbuild/mozbuild/gn_processor.py b/python/mozbuild/mozbuild/gn_processor.py index 79902bd0cc15..4a66896cbf6f 100644 --- a/python/mozbuild/mozbuild/gn_processor.py +++ b/python/mozbuild/mozbuild/gn_processor.py @@ -277,8 +277,8 @@ def process_gn_config(gn_config, srcdir, config, output, non_unified_sources, 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 = {