configure: Support delayload on llvm-mingw.

This commit is contained in:
Jacek Caban 2020-11-27 21:07:03 +01:00
parent a76dd884fa
commit 47b539699d
2 changed files with 6 additions and 4 deletions

View File

@ -2076,6 +2076,7 @@ ia64*-hpux*)
# Silence problematic clang warnings
CXXFLAGS="$CXXFLAGS -Wno-incompatible-ms-struct"
LDFLAGS="$LDFLAGS -Wl,-Xlink=-filealign:0x1000"
MOZ_DELAYLOAD_FLAG="-Wl,-Xlink=-DELAYLOAD:"
fi
if test -n "$MOZ_PDB"; then
@ -2261,6 +2262,7 @@ ia64*-hpux*)
dnl allow AVX2 code from VS2012
HAVE_X86_AVX2=1
MOZ_MEMORY=1
MOZ_DELAYLOAD_FLAG="-DELAYLOAD:"
fi
AC_DEFINE(HAVE_SNPRINTF)
AC_DEFINE(_WINDOWS)
@ -2270,6 +2272,7 @@ ia64*-hpux*)
AC_DEFINE(HW_THREADS)
AC_DEFINE(STDC_HEADERS)
AC_DEFINE(WIN32_LEAN_AND_MEAN)
AC_SUBST(MOZ_DELAYLOAD_FLAG)
dnl See http://support.microsoft.com/kb/143208 to use STL
AC_DEFINE(NOMINMAX)
_PLATFORM_DEFAULT_TOOLKIT='cairo-windows'

View File

@ -743,10 +743,9 @@ class TreeMetadataEmitter(LoggingMixin):
if v in context and context[v]:
passthru.variables[v] = context[v]
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('MOZ_DELAYLOAD_FLAG'):
context['LDFLAGS'].extend([(context.config.substs.get('MOZ_DELAYLOAD_FLAG') + dll)
for dll in context['DELAYLOAD_DLLS']])
context['OS_LIBS'].append('delayimp')
for v in ['CFLAGS', 'CXXFLAGS', 'CMFLAGS', 'CMMFLAGS', 'ASFLAGS',