From 004d9a25d701ba3468cd2df15eb086c665d2f343 Mon Sep 17 00:00:00 2001 From: Tom Ritter Date: Wed, 28 Aug 2019 14:18:29 +0000 Subject: [PATCH] Bug 1570597 - Pass the -delayload flag to lld correctly for MinGW builds r=firefox-build-system-reviewers,mshal Differential Revision: https://phabricator.services.mozilla.com/D43455 --HG-- extra : moz-landing-system : lando --- python/mozbuild/mozbuild/frontend/emitter.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py index 91e5e8e5168d..2d49e328dc1f 100644 --- a/python/mozbuild/mozbuild/frontend/emitter.py +++ b/python/mozbuild/mozbuild/frontend/emitter.py @@ -1056,8 +1056,12 @@ class TreeMetadataEmitter(LoggingMixin): if context.config.substs.get('OS_TARGET') == 'WINNT' and \ context['DELAYLOAD_DLLS']: - context['LDFLAGS'].extend([('-DELAYLOAD:%s' % dll) - for dll in context['DELAYLOAD_DLLS']]) + if context.config.substs.get('CC_TYPE') != 'clang': + context['LDFLAGS'].extend([('-DELAYLOAD:%s' % dll) + for dll in context['DELAYLOAD_DLLS']]) + else: + context['LDFLAGS'].extend([('-Wl,-Xlink=-DELAYLOAD:%s' % dll) + for dll in context['DELAYLOAD_DLLS']]) context['OS_LIBS'].append('delayimp') for v in ['CMFLAGS', 'CMMFLAGS']: