Bug 1590624 - Use windows-style stl_wrappers for mingw build r=glandium

Turns out we were using the Linux ones. This uses the Windows ones, and
adds _HAS_EXCEPTIONS to the mingw defines so the stl_wrappers behave
correctly.

Differential Revision: https://phabricator.services.mozilla.com/D54530

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tom Ritter 2019-12-12 06:38:41 +00:00
Родитель 9a59ac123c
Коммит 7725492776
2 изменённых файлов: 7 добавлений и 6 удалений

Просмотреть файл

@ -41,10 +41,10 @@ HOST_DEFINES = {
include('stl-headers.mozbuild')
if CONFIG['WRAP_STL_INCLUDES']:
stl_compiler = None
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
stl_compiler = 'gcc'
elif CONFIG['CC_TYPE'] == 'clang-cl':
if CONFIG['OS_TARGET'] == 'WINNT':
stl_compiler = 'msvc'
else:
stl_compiler = 'gcc'
if stl_compiler:
# Note that the 'stl_wrappers' folder is known to the build system as
@ -67,7 +67,7 @@ if CONFIG['WRAP_STL_INCLUDES']:
# NOTE: If we aren't wrapping STL includes, we're building part of the browser
# which won't need this wrapper, such as L10N. Just don't try to generate the
# wrapper in that case.
if CONFIG['OS_ARCH'] == 'WINNT':
if CONFIG['OS_TARGET'] == 'WINNT':
GeneratedFile('../dist/stl_wrappers/windows.h',
script='make-windows-h-wrapper.py',
entry_point='generate',

Просмотреть файл

@ -206,8 +206,6 @@ case "$target" in
WRAP_STL_INCLUDES=1
STL_FLAGS="-I${DIST}/stl_wrappers"
CFLAGS="$CFLAGS -D_HAS_EXCEPTIONS=0"
CXXFLAGS="$CXXFLAGS -D_HAS_EXCEPTIONS=0"
else
# Check w32api version
_W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'`
@ -229,6 +227,9 @@ case "$target" in
AC_DEFINE(STRSAFE_NO_DEPRECATE)
fi # !GNU_CC
CFLAGS="$CFLAGS -D_HAS_EXCEPTIONS=0"
CXXFLAGS="$CXXFLAGS -D_HAS_EXCEPTIONS=0"
AC_DEFINE_UNQUOTED(WINVER,0x$WINVER)
AC_DEFINE_UNQUOTED(_WIN32_WINNT,0x$WINVER)
# Require OS features provided by IE 8.0 (Win7)