Bug 1440013 For MinGW build, pass -Wa,-mbig-obj to solve 'too many sections' errors r?glandium
MozReview-Commit-ID: 9ObJnrcpeKe
--- a/build/autoconf/compiler-opts.m4
+++ b/build/autoconf/compiler-opts.m4
@@ -118,16 +118,22 @@ if test "$CLANG_CXX"; then
## from C.
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-unknown-warning-option -Wno-return-type-c-linkage"
fi
if test "$GNU_CC"; then
if test -z "$DEVELOPER_OPTIONS"; then
CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections"
+
+ # For MinGW, we need big-obj otherwise we create too many sections in Unified builds
+ if test "${OS_ARCH}" = "WINNT"; then
+ CFLAGS="$CFLAGS -Wa,-mbig-obj"
+ CXXFLAGS="$CXXFLAGS -Wa,-mbig-obj"
+ fi
fi
CFLAGS="$CFLAGS -fno-math-errno"
CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-math-errno"
fi
dnl ========================================================
dnl = Identical Code Folding
dnl ========================================================