Bug 1133384 - Add -MaxILKSize to LDFLAGS for MSVC to avoid LNK1248 error. r=glandium
authorXidorn Quan <quanxunzhen@gmail.com>
Thu, 19 Feb 2015 10:29:35 +1300
changeset 256843 a3642ea4fdf0d82e057ea8ba9a83664457650654
parent 256842 4b55612b43f5c666aa28bcd5116447dfb75efb64
child 256844 9f6ba4598996042ec9648472dac8103bc2a6af08
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1133384
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1133384 - Add -MaxILKSize to LDFLAGS for MSVC to avoid LNK1248 error. r=glandium
configure.in
--- a/configure.in
+++ b/configure.in
@@ -2299,16 +2299,21 @@ ia64*-hpux*)
         dnl with the linker doing most of the work in the whole-program
         dnl optimization/PGO case. I think it's probably a compiler bug,
         dnl but we work around it here.
         PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
         dnl XXX: should be -LTCG:PGOPTIMIZE, but that fails on libxul.
         dnl Probably also a compiler bug, but what can you do?
         PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
         LDFLAGS="$LDFLAGS -DYNAMICBASE"
+        if test "$_CC_MAJOR_VERSION" = "18" -a "$_CC_BUILD_VERSION" = "31101"; then
+            dnl Use MaxILKSize as a workaround for LNK1248 in VS2013update4
+            dnl See https://connect.microsoft.com/VisualStudio/feedback/details/1044914/fatal-error-lnk1248
+            LDFLAGS="$LDFLAGS -MaxILKSize:2147483647"
+        fi
         dnl Minimum reqiurement of Gecko is VS2010 or later which supports
         dnl both SSSE3 and SSE4.1.
         HAVE_TOOLCHAIN_SUPPORT_MSSSE3=1
         HAVE_TOOLCHAIN_SUPPORT_MSSE4_1=1
         dnl allow AVX2 code from VS2012
         HAVE_X86_AVX2=1
         MOZ_MEMORY=1
     fi