diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in index 93dfa8892fea..ad0ecbab38c9 100644 --- a/browser/app/Makefile.in +++ b/browser/app/Makefile.in @@ -67,22 +67,6 @@ PROGRAMS_DEST = $(DIST)/bin include $(topsrcdir)/config/rules.mk -ifeq ($(OS_ARCH),WINNT) #{ -# -# Control the default heap size. -# This is the heap returned by GetProcessHeap(). -# As we use the CRT heap, the default size is too large and wastes VM. -# -# The default heap size is 1MB on Win32. -# The heap will grow if need be. -# -# Set it to 256k. See bug 127069. -# -ifndef GNU_CC #{ -LDFLAGS += /HEAP:0x40000 -endif #} -endif #} - ifneq (,$(filter-out WINNT,$(OS_ARCH))) ifdef COMPILE_ENVIRONMENT diff --git a/browser/app/moz.build b/browser/app/moz.build index 33b2fa76daec..07fed1c03807 100644 --- a/browser/app/moz.build +++ b/browser/app/moz.build @@ -40,3 +40,14 @@ if CONFIG['_MSC_VER']: if CONFIG['OS_ARCH'] == 'WINNT': DEFINES['MOZ_PHOENIX'] = True + +# Control the default heap size. +# This is the heap returned by GetProcessHeap(). +# As we use the CRT heap, the default size is too large and wastes VM. +# +# 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'] diff --git a/embedding/tests/winEmbed/Makefile.in b/embedding/tests/winEmbed/Makefile.in index a36f7bad44fd..c4895ada9f90 100644 --- a/embedding/tests/winEmbed/Makefile.in +++ b/embedding/tests/winEmbed/Makefile.in @@ -37,22 +37,3 @@ STL_FLAGS= OS_LIBS += $(call EXPAND_LIBNAME,ole32 comdlg32 shell32 version) include $(topsrcdir)/config/rules.mk - -# -# Control the default heap size. -# This is the heap returned by GetProcessHeap(). -# As we use the CRT heap, the default size is too large and wastes VM. -# -# The default heap size is 1MB on Win32. -# The heap will grow if need be. -# -# Set it to 256k. See bug 127069. -# -ifndef GNU_CC -LDFLAGS += /HEAP:0x40000 -endif - -# Get rid of console window -ifdef GNU_CC -LDFLAGS += -mwindows -endif diff --git a/embedding/tests/winEmbed/moz.build b/embedding/tests/winEmbed/moz.build index 6608d50dd5da..9d68e125d9b9 100644 --- a/embedding/tests/winEmbed/moz.build +++ b/embedding/tests/winEmbed/moz.build @@ -17,3 +17,17 @@ XPI_NAME = 'winembed' DEFINES['XPCOM_GLUE'] = True RESFILE = 'winEmbed.res' + +if CONFIG['GNU_CC']: + # Get rid of console window + LDFLAGS += ['-mwindows'] +else: + # Control the default heap size. + # This is the heap returned by GetProcessHeap(). + # As we use the CRT heap, the default size is too large and wastes VM. + # + # The default heap size is 1MB on Win32. + # The heap will grow if need be. + # + # Set it to 256k. See bug 127069. + LDFLAGS += ['/HEAP:0x40000'] diff --git a/ipc/app/Makefile.in b/ipc/app/Makefile.in index 74a177650098..8c8f0882e0b3 100644 --- a/ipc/app/Makefile.in +++ b/ipc/app/Makefile.in @@ -50,19 +50,6 @@ endif # Note the manifest file exists in the tree, so we use the explicit filename # here. EXTRA_DEPS += plugin-container.exe.manifest -# -# Control the default heap size. -# This is the heap returned by GetProcessHeap(). -# As we use the CRT heap, the default size is too large and wastes VM. -# -# The default heap size is 1MB on Win32. -# The heap will grow if need be. -# -# Set it to 256k. See bug 127069. -# -ifndef GNU_CC #{ -LDFLAGS += /HEAP:0x40000 -endif #} endif #} ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) #{ diff --git a/ipc/app/moz.build b/ipc/app/moz.build index f8db2eb1f466..6a615cf8df8d 100644 --- a/ipc/app/moz.build +++ b/ipc/app/moz.build @@ -34,3 +34,14 @@ 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(). +# As we use the CRT heap, the default size is too large and wastes VM. +# +# 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'] diff --git a/webapprt/win/Makefile.in b/webapprt/win/Makefile.in index 98cb66b2d08e..82c3a80cff5f 100644 --- a/webapprt/win/Makefile.in +++ b/webapprt/win/Makefile.in @@ -69,16 +69,3 @@ GRE_BUILDID := $(shell cat $(DEPTH)/config/buildid) DEFINES += -DGRE_BUILDID=$(GRE_BUILDID) webapprt.$(OBJ_SUFFIX): $(DEPTH)/config/buildid - -# Control the default heap size. -# This is the heap returned by GetProcessHeap(). -# As we use the CRT heap, the default size is too large and wastes VM. -# -# The default heap size is 1MB on Win32. -# The heap will grow if need be. -# -# Set it to 256k. See bug 127069. -# -ifndef GNU_CC -LDFLAGS += /HEAP:0x40000 -endif diff --git a/webapprt/win/moz.build b/webapprt/win/moz.build index 5db064b5905a..ae455f471e37 100644 --- a/webapprt/win/moz.build +++ b/webapprt/win/moz.build @@ -28,3 +28,14 @@ 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(). +# As we use the CRT heap, the default size is too large and wastes VM. +# +# The default heap size is 1MB on Win32. +# The heap will grow if need be. +# +# Set it to 256k. See bug 127069. +if not CONFIG['GNU_CC']: + LDFLAGS += ['/HEAP:0x40000'] diff --git a/xulrunner/app/Makefile.in b/xulrunner/app/Makefile.in index b3dbcc461aab..792f4a93a702 100644 --- a/xulrunner/app/Makefile.in +++ b/xulrunner/app/Makefile.in @@ -41,22 +41,6 @@ include $(topsrcdir)/config/rules.mk DEFINES += -DXULRUNNER_ICO='"$(DIST)/branding/xulrunner.ico"' -DDOCUMENT_ICO='"$(DIST)/branding/document.ico"' -ifeq ($(OS_ARCH),WINNT) -# -# Control the default heap size. -# This is the heap returned by GetProcessHeap(). -# As we use the CRT heap, the default size is too large and wastes VM. -# -# The default heap size is 1MB on Win32. -# The heap will grow if need be. -# -# Set it to 256k. See bug 127069. -# -ifndef GNU_CC -LDFLAGS += /HEAP:0x40000 -endif -endif - ifdef MOZ_WIDGET_GTK libs:: $(INSTALL) $(IFLAGS1) $(DIST)/branding/default16.png $(DIST)/bin/chrome/icons/default diff --git a/xulrunner/app/moz.build b/xulrunner/app/moz.build index 345bf69fa6e1..0812544c07c4 100644 --- a/xulrunner/app/moz.build +++ b/xulrunner/app/moz.build @@ -31,3 +31,14 @@ 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(). +# As we use the CRT heap, the default size is too large and wastes VM. +# +# 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']