Bug 1023941 - Part 1: Static-link the CRT into firefox.exe. r=glandium
authorDavid Major <dmajor@mozilla.com>
Tue, 05 Aug 2014 15:50:39 +1200
changeset 202107 baa3f852133baf355cf7656295c200bfa74c846a
parent 202106 fd00d686183f6d03f3fba77c4463d158930c6b55
child 202108 8ae39d920f5ca8ef95bb17cd8065921d391428a2
push id27390
push usercbook@mozilla.com
push dateThu, 28 Aug 2014 11:07:34 +0000
treeherdermozilla-central@2a15dc07ddaa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1023941
milestone34.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 1023941 - Part 1: Static-link the CRT into firefox.exe. r=glandium
browser/app/moz.build
--- a/browser/app/moz.build
+++ b/browser/app/moz.build
@@ -25,16 +25,21 @@ GENERATED_INCLUDES += [
 ]
 
 LOCAL_INCLUDES += [
     '/toolkit/xre',
     '/xpcom/base',
     '/xpcom/build',
 ]
 
+DELAYLOAD_DLLS += [
+    'mozglue.dll',
+]
+USE_STATIC_LIBS = True
+
 if CONFIG['_MSC_VER']:
     # Always enter a Windows program through wmain, whether or not we're
     # a console application.
     WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     RCINCLUDE = 'splash.rc'
     DEFINES['MOZ_PHOENIX'] = True
@@ -45,19 +50,25 @@ if CONFIG['OS_ARCH'] == 'WINNT':
 #
 # The default heap size is 1MB on Win32.
 # The heap will grow if need be.
 #
 # Set it to 256k.  See bug 127069.
 if CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['GNU_CC']:
     LDFLAGS += ['/HEAP:0x40000']
 
-USE_LIBS += [
-    'xpcomglue',
-]
+if CONFIG['OS_ARCH'] == 'WINNT':
+    USE_LIBS += [
+        'mozglue',
+        'xpcomglue_staticruntime',
+    ]
+else:
+    USE_LIBS += [
+        'xpcomglue',
+    ]
 
 DISABLE_STL_WRAPPING = True
 
 if CONFIG['MOZ_LINKER']:
     OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
 
 if CONFIG['HAVE_CLOCK_MONOTONIC']:
     OS_LIBS += CONFIG['REALTIME_LIBS']