Bug 1060890 Port static linking of the CRT into the Thunderbird executable from bug 1023941. rs=port-by-build-system-peer for CLOSED TREE
authorMark Banner <standard8@mozilla.com>
Wed, 03 Sep 2014 13:20:58 +0100
changeset 16750 9f8ef4f974ea28b76e5d3a9045031f410b3ef01a
parent 16749 f2a455fd8e80444dfe77fbd43e3f9ac01036592f
child 16751 1575d08812cb7032866262a1bb7c5de93cdc65ba
push id10423
push usermbanner@mozilla.com
push dateWed, 03 Sep 2014 12:21:18 +0000
treeherdercomm-central@9f8ef4f974ea [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersport-by-build-system-peer
bugs1060890, 1023941
Bug 1060890 Port static linking of the CRT into the Thunderbird executable from bug 1023941. rs=port-by-build-system-peer for CLOSED TREE
mail/app/moz.build
--- a/mail/app/moz.build
+++ b/mail/app/moz.build
@@ -13,19 +13,20 @@ if not CONFIG['LIBXUL_SDK']:
     PROGRAM = CONFIG['MOZ_APP_NAME']
     SOURCES += ['nsMailApp.cpp']
     LOCAL_INCLUDES += [
         '/mozilla/toolkit/xre',
         '/mozilla/xpcom/base',
         '/mozilla/xpcom/build',
     ]
 
-    USE_LIBS += [
-        'xpcomglue',
+    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']
 
     # Control the default heap size.
     # This is the heap returned by GetProcessHeap().
@@ -33,12 +34,22 @@ if not CONFIG['LIBXUL_SDK']:
     #
     # 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']
 
+    if CONFIG['OS_ARCH'] == 'WINNT':
+        USE_LIBS += [
+            'mozglue',
+            'xpcomglue_staticruntime',
+        ]
+    else:
+        USE_LIBS += [
+            'xpcomglue',
+        ]
+
     if CONFIG['MOZ_LINKER']:
         OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
 
 DISABLE_STL_WRAPPING = True