From dd44008d7b4b6eec87d5d519949864916af85113 Mon Sep 17 00:00:00 2001 From: Tom Ritter Date: Tue, 6 Mar 2018 16:40:38 -0600 Subject: [PATCH] Bug 1440013 For MinGW build, pass -Wa,-mbig-obj to solve 'too many sections' errors r=glandium MozReview-Commit-ID: 9ObJnrcpeKe --HG-- extra : rebase_source : fb071396e0d34e0baa084cb9b238944f7ffe066c --- build/autoconf/compiler-opts.m4 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/autoconf/compiler-opts.m4 b/build/autoconf/compiler-opts.m4 index 3d9dc5a80032..b8ff219aa5d2 100644 --- a/build/autoconf/compiler-opts.m4 +++ b/build/autoconf/compiler-opts.m4 @@ -123,6 +123,12 @@ 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"