Bug 914245 - Move FORCE_SHARED_LIB to moz.build. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 19 Nov 2013 11:47:45 +0900
changeset 165246 ec4d30f2de51ca8192f255c38b22e42a7d31c0cb
parent 165245 c029f20f7f9401af8dffdc31e6ab1dbb43bb38f6
child 165247 3ddc66e67343e9ee8d4fa3640e83070325314a7e
push id4703
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 20:24:19 +0000
treeherdermozilla-aurora@20af7fbd96c1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs914245
milestone28.0a1
Bug 914245 - Move FORCE_SHARED_LIB to moz.build. r=mshal
accessible/public/ia2/Makefile.in
accessible/public/ia2/moz.build
accessible/public/msaa/Makefile.in
accessible/public/msaa/moz.build
browser/components/build/Makefile.in
browser/components/build/moz.build
build/win32/crashinjectdll/Makefile.in
build/win32/crashinjectdll/moz.build
build/win32/vmwarerecordinghelper/Makefile.in
build/win32/vmwarerecordinghelper/moz.build
config/config.mk
db/sqlite3/src/Makefile.in
db/sqlite3/src/moz.build
dom/plugins/ipc/interpose/Makefile.in
dom/plugins/ipc/interpose/moz.build
dom/plugins/test/testplugin/testplugin.mk
dom/plugins/test/testplugin/testplugin.mozbuild
extensions/gnomevfs/Makefile.in
extensions/gnomevfs/moz.build
extensions/widgetutils/src/Makefile.in
extensions/widgetutils/src/moz.build
gfx/angle/src/libEGL/Makefile.in
gfx/angle/src/libEGL/moz.build
gfx/angle/src/libGLESv2/Makefile.in
gfx/angle/src/libGLESv2/moz.build
js/src/Makefile.in
js/src/config/config.mk
js/src/moz.build
js/xpconnect/tests/components/native/Makefile.in
js/xpconnect/tests/components/native/moz.build
layout/media/Makefile.in
layout/media/moz.build
media/omx-plugin/Makefile.in
media/omx-plugin/froyo/Makefile.in
media/omx-plugin/froyo/moz.build
media/omx-plugin/gb/Makefile.in
media/omx-plugin/gb/moz.build
media/omx-plugin/gb235/Makefile.in
media/omx-plugin/gb235/moz.build
media/omx-plugin/hc/Makefile.in
media/omx-plugin/hc/moz.build
media/omx-plugin/lib/froyo/libstagefright/Makefile.in
media/omx-plugin/lib/froyo/libstagefright/moz.build
media/omx-plugin/lib/gb/libstagefright/Makefile.in
media/omx-plugin/lib/gb/libstagefright/moz.build
media/omx-plugin/lib/gb/libstagefright_color_conversion/Makefile.in
media/omx-plugin/lib/gb/libstagefright_color_conversion/moz.build
media/omx-plugin/lib/gb/libutils/Makefile.in
media/omx-plugin/lib/gb/libutils/moz.build
media/omx-plugin/lib/gb235/libstagefright/Makefile.in
media/omx-plugin/lib/gb235/libstagefright/moz.build
media/omx-plugin/lib/hc/libstagefright/Makefile.in
media/omx-plugin/lib/hc/libstagefright/moz.build
media/omx-plugin/lib/ics/libstagefright/Makefile.in
media/omx-plugin/lib/ics/libstagefright/moz.build
media/omx-plugin/lib/ics/libutils/Makefile.in
media/omx-plugin/lib/ics/libutils/moz.build
media/omx-plugin/moz.build
memory/mozalloc/Makefile.in
memory/mozalloc/moz.build
memory/replace/dmd/Makefile.in
memory/replace/dmd/moz.build
memory/replace/dummy/Makefile.in
memory/replace/dummy/moz.build
memory/replace/jemalloc/Makefile.in
memory/replace/jemalloc/moz.build
mozglue/build/Makefile.in
mozglue/build/moz.build
security/build/Makefile.in
security/build/moz.build
security/sandbox/win/src/sandboxbroker/Makefile.in
security/sandbox/win/src/sandboxbroker/moz.build
toolkit/components/ctypes/tests/Makefile.in
toolkit/components/ctypes/tests/moz.build
toolkit/crashreporter/injector/Makefile.in
toolkit/crashreporter/injector/moz.build
toolkit/crashreporter/test/Makefile.in
toolkit/crashreporter/test/moz.build
toolkit/library/Makefile.in
toolkit/library/moz.build
toolkit/library/winvccorlib/Makefile.in
toolkit/library/winvccorlib/moz.build
toolkit/system/dbus/Makefile.in
toolkit/system/dbus/moz.build
toolkit/system/gnome/Makefile.in
toolkit/system/gnome/moz.build
tools/jprof/stub/Makefile.in
tools/jprof/stub/moz.build
xpcom/tests/bug656331_component/Makefile.in
xpcom/tests/bug656331_component/moz.build
xpcom/tests/component/Makefile.in
xpcom/tests/component/moz.build
xpcom/tests/component_no_aslr/Makefile.in
xpcom/tests/component_no_aslr/moz.build
--- a/accessible/public/ia2/Makefile.in
+++ b/accessible/public/ia2/Makefile.in
@@ -5,18 +5,16 @@
 DEFFILE       = $(win_srcdir)/IA2Marshal.def
 
 IA2DIR        = $(topsrcdir)/other-licenses/ia2
 
 DEFINES       += -DREGISTER_PROXY_DLL
 
 GARBAGE       += $(MIDL_GENERATED_FILES)
 
-FORCE_SHARED_LIB = 1
-
 # Please keep this list in sync with the moz.build file until the rest of this
 # Makefile is ported over.
 MIDL_INTERFACES = \
   Accessible2.idl \
   Accessible2_2.idl \
   AccessibleAction.idl \
   AccessibleApplication.idl \
   AccessibleComponent.idl \
--- a/accessible/public/ia2/moz.build
+++ b/accessible/public/ia2/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LIBRARY_NAME = 'IA2Marshal'
 
+FORCE_SHARED_LIB = True
--- a/accessible/public/msaa/Makefile.in
+++ b/accessible/public/msaa/Makefile.in
@@ -3,18 +3,16 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DEFFILE = $(win_srcdir)/AccessibleMarshal.def
 
 DEFINES += -DREGISTER_PROXY_DLL
 
 GARBAGE += $(MIDL_GENERATED_FILES) done_gen dlldata.c
 
-FORCE_SHARED_LIB = 1
-
 MIDL_GENERATED_FILES = \
 	ISimpleDOMNode.h \
 	ISimpleDOMNode_p.c \
 	ISimpleDOMNode_i.c \
 	ISimpleDOMDocument.h \
 	ISimpleDOMDocument_p.c \
 	ISimpleDOMDocument_i.c \
 	ISimpleDOMText.h \
--- a/accessible/public/msaa/moz.build
+++ b/accessible/public/msaa/moz.build
@@ -10,8 +10,10 @@ GENERATED_SOURCES += [
     'dlldata.c',
     'ISimpleDOMDocument_i.c',
     'ISimpleDOMDocument_p.c',
     'ISimpleDOMNode_i.c',
     'ISimpleDOMNode_p.c',
     'ISimpleDOMText_i.c',
     'ISimpleDOMText_p.c',
 ]
+
+FORCE_SHARED_LIB = True
--- a/browser/components/build/Makefile.in
+++ b/browser/components/build/Makefile.in
@@ -1,15 +1,14 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SHORT_LIBNAME = brwsrcmp
 MODULE_NAME = nsBrowserCompsModule
-FORCE_SHARED_LIB = 1
 
 ifeq ($(OS_ARCH),WINNT)
 OS_LIBS	+= $(call EXPAND_LIBNAME,ole32 shell32 shlwapi)
 endif
 
 LOCAL_INCLUDES = \
 	-I$(srcdir)/../shell/src \
 	-I$(srcdir)/../feeds/src \
--- a/browser/components/build/moz.build
+++ b/browser/components/build/moz.build
@@ -11,8 +11,9 @@ EXPORTS += [
 SOURCES += [
     'nsModule.cpp',
 ]
 
 LIBRARY_NAME = 'browsercomps'
 
 IS_COMPONENT = True
 
+FORCE_SHARED_LIB = True
--- a/build/win32/crashinjectdll/Makefile.in
+++ b/build/win32/crashinjectdll/Makefile.in
@@ -1,9 +1,8 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DEFFILE = $(srcdir)/crashinjectdll.def
-FORCE_SHARED_LIB = 1
 USE_STATIC_LIBS = 1
 
 MOZ_GLUE_LDFLAGS =
--- a/build/win32/crashinjectdll/moz.build
+++ b/build/win32/crashinjectdll/moz.build
@@ -5,8 +5,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SOURCES += [
     'crashinjectdll.cpp',
 ]
 
 LIBRARY_NAME = 'crashinjectdll'
 
+FORCE_SHARED_LIB = True
--- a/build/win32/vmwarerecordinghelper/Makefile.in
+++ b/build/win32/vmwarerecordinghelper/Makefile.in
@@ -1,10 +1,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DEFFILE = $(srcdir)/$(LIBRARY_NAME).def
 
-FORCE_SHARED_LIB = 1
 USE_STATIC_LIBS = 1
 
 MOZ_GLUE_LDFLAGS =
--- a/build/win32/vmwarerecordinghelper/moz.build
+++ b/build/win32/vmwarerecordinghelper/moz.build
@@ -5,8 +5,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SOURCES += [
     'vmwarerecordinghelper.cpp',
 ]
 
 LIBRARY_NAME = 'vmwarerecordinghelper'
 
+FORCE_SHARED_LIB = True
--- a/config/config.mk
+++ b/config/config.mk
@@ -37,16 +37,17 @@ endif
   ANDROID_GENERATED_RESFILES \
   ANDROID_RESFILES \
   CMSRCS \
   CMMSRCS \
   CPP_UNIT_TESTS \
   DIRS \
   EXTRA_PP_COMPONENTS \
   EXTRA_PP_JS_MODULES \
+  FORCE_SHARED_LIB \
   FORCE_STATIC_LIB \
   GTEST_CMMSRCS \
   GTEST_CPPSRCS \
   GTEST_CSRCS \
   HOST_CSRCS \
   HOST_CMMSRCS \
   HOST_LIBRARY_NAME \
   HOST_PROGRAM \
--- a/db/sqlite3/src/Makefile.in
+++ b/db/sqlite3/src/Makefile.in
@@ -1,17 +1,14 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SHORT_LIBNAME    = mozsqlt3
-ifndef MOZ_FOLD_LIBS
-FORCE_SHARED_LIB = 1
-endif
 LIB_IS_C_ONLY    = 1
 
 ifeq ($(OS_ARCH),WINNT)
 DEFFILE = $(CURDIR)/sqlite-processed.def
 RCFILE  = sqlite.rc
 RESFILE = sqlite.res
 
 GARBAGE += \
--- a/db/sqlite3/src/moz.build
+++ b/db/sqlite3/src/moz.build
@@ -12,8 +12,10 @@ EXPORTS += [
 LIBRARY_NAME = 'mozsqlite3'
 
 SOURCES += [
     'sqlite3.c',
 ]
 
 if CONFIG['MOZ_FOLD_LIBS']:
     FORCE_STATIC_LIB = True
+else:
+    FORCE_SHARED_LIB = True
--- a/dom/plugins/ipc/interpose/Makefile.in
+++ b/dom/plugins/ipc/interpose/Makefile.in
@@ -1,11 +1,10 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_SHARED_LIB = 1
 DIST_INSTALL     = 1
 
 
 EXTRA_DSO_LDOPTS += \
   -framework Carbon \
   $(NULL)
--- a/dom/plugins/ipc/interpose/moz.build
+++ b/dom/plugins/ipc/interpose/moz.build
@@ -6,8 +6,10 @@
 
 LIBRARY_NAME = 'plugin_child_interpose'
 
 SOURCES += [ "%s.mm" % (LIBRARY_NAME) ]
 
 SOURCES += [
     'plugin_child_quirks.mm',
 ]
+
+FORCE_SHARED_LIB = True
--- a/dom/plugins/test/testplugin/testplugin.mk
+++ b/dom/plugins/test/testplugin/testplugin.mk
@@ -1,15 +1,13 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_SHARED_LIB = 1
-
 # Don't use STL wrappers; nptest isn't Gecko code
 STL_FLAGS =
 
 # must link statically with the CRT; nptest isn't Gecko code
 USE_STATIC_LIBS = 1
 
 VPATH += $(topsrcdir)/build
 
--- a/dom/plugins/test/testplugin/testplugin.mozbuild
+++ b/dom/plugins/test/testplugin/testplugin.mozbuild
@@ -35,8 +35,10 @@ elif toolkit == 'os2':
 elif toolkit == 'qt':
     SOURCES += [
         relative_path + '/nptest_qt.cpp',
     ]
 elif toolkit == 'windows':
     SOURCES += [
         relative_path + '/nptest_windows.cpp',
     ]
+
+FORCE_SHARED_LIB = True
--- a/extensions/gnomevfs/Makefile.in
+++ b/extensions/gnomevfs/Makefile.in
@@ -7,13 +7,8 @@ SHORT_LIBNAME	= nkgnomevfs
 
 LOCAL_INCLUDES	= $(MOZ_GNOMEVFS_CFLAGS)
 
 EXTRA_DSO_LDOPTS = \
 		   $(XPCOM_GLUE_LDOPTS) \
 		   $(NSPR_LIBS) \
 		   $(MOZ_GNOMEVFS_LIBS) \
 		   $(NULL)
-
-# make sure this component is never statically linked into the main
-# application.  this is necessary since we don't want to force users
-# to install gnome-vfs2 in order to use the rest of mozilla ;-)
-FORCE_SHARED_LIB= 1
--- a/extensions/gnomevfs/moz.build
+++ b/extensions/gnomevfs/moz.build
@@ -7,8 +7,12 @@
 SOURCES += [
     'nsGnomeVFSProtocolHandler.cpp',
 ]
 
 LIBRARY_NAME = 'nkgnomevfs'
 
 IS_COMPONENT = True
 
+# make sure this component is never statically linked into the main
+# application.  this is necessary since we don't want to force users
+# to install gnome-vfs2 in order to use the rest of mozilla ;-)
+FORCE_SHARED_LIB = True
--- a/extensions/widgetutils/src/Makefile.in
+++ b/extensions/widgetutils/src/Makefile.in
@@ -1,13 +1,12 @@
 # vim:set ts=8 sw=8 sts=8 noet:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SHORT_LIBNAME = widgetutils
-FORCE_SHARED_LIB = 1
 
 EXTRA_DSO_LDOPTS = \
   $(XPCOM_GLUE_LDOPTS) \
   $(NSPR_LIBS) \
   $(MOZ_COMPONENT_LIBS) \
   $(NULL)
--- a/extensions/widgetutils/src/moz.build
+++ b/extensions/widgetutils/src/moz.build
@@ -11,8 +11,10 @@ SOURCES += [
 LIBRARY_NAME = 'widgetutils'
 
 IS_COMPONENT = True
 
 XPI_NAME = 'widgetutils'
 
 if CONFIG['TARGET_XPCOM_ABI']:
     FINAL_TARGET += '/platform/%(OS_TARGET)s_%(TARGET_XPCOM_ABI)s' % CONFIG
+
+FORCE_SHARED_LIB = True
--- a/gfx/angle/src/libEGL/Makefile.in
+++ b/gfx/angle/src/libEGL/Makefile.in
@@ -1,15 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-# On Windows, we don't automatically get "lib" prepended, but we need it.
-FORCE_SHARED_LIB = 1
-
 # ANGLE uses the STL, so we can't use our derpy STL wrappers.
 STL_FLAGS =
 
 ifndef GNU_CC
 # Enable unwind semantics for exception handlers in response to warning C4530.
 OS_CPPFLAGS += -EHsc
 endif
 
--- a/gfx/angle/src/libEGL/moz.build
+++ b/gfx/angle/src/libEGL/moz.build
@@ -16,9 +16,12 @@ SOURCES += ['../common/' + src for src i
 SOURCES += [
     'Config.cpp',
     'Display.cpp',
     'libEGL.cpp',
     'main.cpp',
     'Surface.cpp',
 ]
 
+# On Windows, we don't automatically get "lib" prepended, but we need it.
 LIBRARY_NAME = 'libEGL'
+
+FORCE_SHARED_LIB = True
--- a/gfx/angle/src/libGLESv2/Makefile.in
+++ b/gfx/angle/src/libGLESv2/Makefile.in
@@ -1,15 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-# On Windows, we don't automatically get "lib" prepended, but we need it.
-FORCE_SHARED_LIB = 1
-
 # ANGLE uses the STL, so we can't use our derpy STL wrappers.
 STL_FLAGS =
 
 ifndef GNU_CC
 # Enable unwind semantics for exception handlers in response to warning C4530.
 OS_CPPFLAGS += -EHsc
 endif
 
--- a/gfx/angle/src/libGLESv2/moz.build
+++ b/gfx/angle/src/libGLESv2/moz.build
@@ -170,9 +170,12 @@ SOURCES += ['renderer/' + src for src in
     'TextureStorage9.cpp',
     'VertexBuffer.cpp',
     'VertexBuffer11.cpp',
     'VertexBuffer9.cpp',
     'VertexDataManager.cpp',
     'VertexDeclarationCache.cpp',
 ]]
 
+# On Windows, we don't automatically get "lib" prepended, but we need it.
 LIBRARY_NAME = 'libGLESv2'
+
+FORCE_SHARED_LIB = True
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -15,27 +15,16 @@ endif
 endif
 
 TOPLEVEL_BUILD := 1
 
 run_for_side_effects := $(shell echo "MAKE: $(MAKE)")
 STATIC_LIBRARY_NAME = js_static
 LIBS		= $(NSPR_LIBS)
 
-# JavaScript must be built shared, even for static builds, as it is used by
-# other modules which are always built shared. Failure to do so results in
-# the js code getting copied into xpinstall and jsd as well as mozilla-bin,
-# and then the static data cells used for locking no longer work.
-#
-# In fact, we now build both a static and a shared library, as the
-# JS shell would like to link to the static library.
-
-ifdef JS_SHARED_LIBRARY
-FORCE_SHARED_LIB = 1
-endif
 DIST_INSTALL = 1
 
 VPATH		+= \
 		$(srcdir) \
 		$(srcdir)/builtin \
 		$(srcdir)/devtools \
 		$(srcdir)/ds \
 		$(srcdir)/frontend \
--- a/js/src/config/config.mk
+++ b/js/src/config/config.mk
@@ -37,16 +37,17 @@ endif
   ANDROID_GENERATED_RESFILES \
   ANDROID_RESFILES \
   CMSRCS \
   CMMSRCS \
   CPP_UNIT_TESTS \
   DIRS \
   EXTRA_PP_COMPONENTS \
   EXTRA_PP_JS_MODULES \
+  FORCE_SHARED_LIB \
   FORCE_STATIC_LIB \
   GTEST_CMMSRCS \
   GTEST_CPPSRCS \
   GTEST_CSRCS \
   HOST_CSRCS \
   HOST_CMMSRCS \
   HOST_LIBRARY_NAME \
   HOST_PROGRAM \
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -366,9 +366,20 @@ HOST_SOURCES += [
     'jskwgen.cpp',
     'jsoplengen.cpp',
 ]
 
 HOST_SIMPLE_PROGRAMS += [
     'host_%s' % f.replace('.cpp', '') for f in HOST_SOURCES
 ]
 
+# JavaScript must be built shared, even for static builds, as it is used by
+# other modules which are always built shared. Failure to do so results in
+# the js code getting copied into xpinstall and jsd as well as mozilla-bin,
+# and then the static data cells used for locking no longer work.
+#
+# In fact, we now build both a static and a shared library, as the
+# JS shell would like to link to the static library.
+
+if CONFIG['JS_SHARED_LIBRARY']:
+    FORCE_SHARED_LIB = True
+
 FORCE_STATIC_LIB = True
--- a/js/xpconnect/tests/components/native/Makefile.in
+++ b/js/xpconnect/tests/components/native/Makefile.in
@@ -1,15 +1,14 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE_NAME = xpconnect_test
-FORCE_SHARED_LIB = 1
 
 componentdir = js/xpconnect/tests/components/native
 
 MANIFEST = xpctest.manifest
 MANIFEST_PATH = $(testxpcobjdir)/$(componentdir)
 PP_TARGETS += MANIFEST
 
 EXTRA_DSO_LDOPTS += \
--- a/js/xpconnect/tests/components/native/moz.build
+++ b/js/xpconnect/tests/components/native/moz.build
@@ -11,8 +11,9 @@ UNIFIED_SOURCES += [
     'xpctest_module.cpp',
     'xpctest_params.cpp',
 ]
 
 LIBRARY_NAME = 'xpctest'
 
 IS_COMPONENT = True
 
+FORCE_SHARED_LIB = True
--- a/layout/media/Makefile.in
+++ b/layout/media/Makefile.in
@@ -1,17 +1,14 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 EXPORT_LIBRARY	= $(DIST)/lib
-ifeq (WINNT,$(OS_TARGET))
-FORCE_SHARED_LIB = 1
-endif
 
 ifeq (WINNT,$(OS_TARGET))
 EXTRA_DSO_LDOPTS = $(MOZALLOC_LIB) $(NSPR_LIBS)
 OS_LIBS += $(call EXPAND_LIBNAME,usp10 ole32)
 DEFFILE = symbols.def
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/layout/media/moz.build
+++ b/layout/media/moz.build
@@ -1,10 +1,13 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LIBRARY_NAME = 'gkmedias'
 
+if CONFIG['OS_TARGET'] == 'WINNT':
+    FORCE_SHARED_LIB = True
+
 if CONFIG['MOZ_WEBRTC']:
     DIRS += ['webrtc']
--- a/media/omx-plugin/Makefile.in
+++ b/media/omx-plugin/Makefile.in
@@ -8,17 +8,16 @@
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 MODULE_NAME = omxplugin
-FORCE_SHARED_LIB = 1
 
 # Don't use STL wrappers; this isn't Gecko code
 STL_FLAGS =
 
 # must link statically with the CRT; this isn't Gecko code
 USE_STATIC_LIBS = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/media/omx-plugin/froyo/Makefile.in
+++ b/media/omx-plugin/froyo/Makefile.in
@@ -8,17 +8,16 @@
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 MODULE_NAME = omxpluginfroyo
-FORCE_SHARED_LIB = 1
 
 # Don't use STL wrappers; this isn't Gecko code
 STL_FLAGS =
 
 # must link statically with the CRT; this isn't Gecko code
 USE_STATIC_LIBS = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/media/omx-plugin/froyo/moz.build
+++ b/media/omx-plugin/froyo/moz.build
@@ -5,8 +5,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SOURCES += [
     'OmxPluginFroyo.cpp',
 ]
 
 LIBRARY_NAME = 'omxpluginfroyo'
 
+FORCE_SHARED_LIB = True
--- a/media/omx-plugin/gb/Makefile.in
+++ b/media/omx-plugin/gb/Makefile.in
@@ -8,17 +8,16 @@
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 MODULE_NAME = omxplugingb
-FORCE_SHARED_LIB = 1
 
 # Don't use STL wrappers; this isn't Gecko code
 STL_FLAGS =
 
 # must link statically with the CRT; this isn't Gecko code
 USE_STATIC_LIBS = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/media/omx-plugin/gb/moz.build
+++ b/media/omx-plugin/gb/moz.build
@@ -5,8 +5,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SOURCES += [
     'OmxPlugin236.cpp',
 ]
 
 LIBRARY_NAME = 'omxplugingb'
 
+FORCE_SHARED_LIB = True
--- a/media/omx-plugin/gb235/Makefile.in
+++ b/media/omx-plugin/gb235/Makefile.in
@@ -8,17 +8,16 @@
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 MODULE_NAME = omxplugingb235
-FORCE_SHARED_LIB = 1
 
 # Don't use STL wrappers; this isn't Gecko code
 STL_FLAGS =
 
 # must link statically with the CRT; this isn't Gecko code
 USE_STATIC_LIBS = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/media/omx-plugin/gb235/moz.build
+++ b/media/omx-plugin/gb235/moz.build
@@ -5,8 +5,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SOURCES += [
     'OmxPlugin235.cpp',
 ]
 
 LIBRARY_NAME = 'omxplugingb235'
 
+FORCE_SHARED_LIB = True
--- a/media/omx-plugin/hc/Makefile.in
+++ b/media/omx-plugin/hc/Makefile.in
@@ -8,17 +8,16 @@
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 MODULE_NAME = omxpluginhc
-FORCE_SHARED_LIB = 1
 
 # Don't use STL wrappers; this isn't Gecko code
 STL_FLAGS =
 
 # must link statically with the CRT; this isn't Gecko code
 USE_STATIC_LIBS = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/media/omx-plugin/hc/moz.build
+++ b/media/omx-plugin/hc/moz.build
@@ -5,8 +5,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SOURCES += [
     'OmxPluginHoneycomb.cpp',
 ]
 
 LIBRARY_NAME = 'omxpluginhc'
 
+FORCE_SHARED_LIB = True
--- a/media/omx-plugin/lib/froyo/libstagefright/Makefile.in
+++ b/media/omx-plugin/lib/froyo/libstagefright/Makefile.in
@@ -7,17 +7,16 @@
 #     http://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 MODULE_NAME = libandroidstagefrightfroyo
-FORCE_SHARED_LIB = 1
 
 # Don't use STL wrappers; this isn't Gecko code
 STL_FLAGS =
 
 # must link statically with the CRT; this isn't Gecko code
 USE_STATIC_LIBS = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/media/omx-plugin/lib/froyo/libstagefright/moz.build
+++ b/media/omx-plugin/lib/froyo/libstagefright/moz.build
@@ -7,8 +7,9 @@ NO_DIST_INSTALL = True
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
     SOURCES += [
         'libstagefright.cpp',
     ]
 
 LIBRARY_NAME = 'stagefright'
 
+FORCE_SHARED_LIB = True
--- a/media/omx-plugin/lib/gb/libstagefright/Makefile.in
+++ b/media/omx-plugin/lib/gb/libstagefright/Makefile.in
@@ -7,17 +7,16 @@
 #     http://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 MODULE_NAME = libandroidstagefrightgb
-FORCE_SHARED_LIB = 1
 
 # Don't use STL wrappers; this isn't Gecko code
 STL_FLAGS =
 
 # must link statically with the CRT; this isn't Gecko code
 USE_STATIC_LIBS = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/media/omx-plugin/lib/gb/libstagefright/moz.build
+++ b/media/omx-plugin/lib/gb/libstagefright/moz.build
@@ -7,8 +7,9 @@ NO_DIST_INSTALL = True
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
     SOURCES += [
         'libstagefright.cpp',
     ]
 
 LIBRARY_NAME = 'stagefright'
 
+FORCE_SHARED_LIB = True
--- a/media/omx-plugin/lib/gb/libstagefright_color_conversion/Makefile.in
+++ b/media/omx-plugin/lib/gb/libstagefright_color_conversion/Makefile.in
@@ -7,17 +7,16 @@
 #     http://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 MODULE_NAME = libstagefright_color_conversion
-FORCE_SHARED_LIB = 1
 
 # Don't use STL wrappers; this isn't Gecko code
 STL_FLAGS =
 
 # must link statically with the CRT; this isn't Gecko code
 USE_STATIC_LIBS = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/media/omx-plugin/lib/gb/libstagefright_color_conversion/moz.build
+++ b/media/omx-plugin/lib/gb/libstagefright_color_conversion/moz.build
@@ -7,8 +7,9 @@ NO_DIST_INSTALL = True
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
     SOURCES += [
         'libstagefright_color_conversion.cpp',
     ]
 
 LIBRARY_NAME = 'stagefright_color_conversion'
 
+FORCE_SHARED_LIB = True
--- a/media/omx-plugin/lib/gb/libutils/Makefile.in
+++ b/media/omx-plugin/lib/gb/libutils/Makefile.in
@@ -7,17 +7,16 @@
 #     http://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 MODULE_NAME = libandroidutilsgb
-FORCE_SHARED_LIB = 1
 
 # Don't use STL wrappers; this isn't Gecko code
 STL_FLAGS =
 
 # must link statically with the CRT; this isn't Gecko code
 USE_STATIC_LIBS = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/media/omx-plugin/lib/gb/libutils/moz.build
+++ b/media/omx-plugin/lib/gb/libutils/moz.build
@@ -7,8 +7,9 @@ NO_DIST_INSTALL = True
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
     SOURCES += [
         'libutils.cpp',
     ]
 
 LIBRARY_NAME = 'utils'
 
+FORCE_SHARED_LIB = True
--- a/media/omx-plugin/lib/gb235/libstagefright/Makefile.in
+++ b/media/omx-plugin/lib/gb235/libstagefright/Makefile.in
@@ -7,17 +7,16 @@
 #     http://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 MODULE_NAME = libandroidstagefrightgb234
-FORCE_SHARED_LIB = 1
 
 # Don't use STL wrappers; this isn't Gecko code
 STL_FLAGS =
 
 # must link statically with the CRT; this isn't Gecko code
 USE_STATIC_LIBS = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/media/omx-plugin/lib/gb235/libstagefright/moz.build
+++ b/media/omx-plugin/lib/gb235/libstagefright/moz.build
@@ -7,8 +7,9 @@ NO_DIST_INSTALL = True
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
     SOURCES += [
         'libstagefright.cpp',
     ]
 
 LIBRARY_NAME = 'stagefright'
 
+FORCE_SHARED_LIB = True
--- a/media/omx-plugin/lib/hc/libstagefright/Makefile.in
+++ b/media/omx-plugin/lib/hc/libstagefright/Makefile.in
@@ -7,17 +7,16 @@
 #     http://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 MODULE_NAME = libandroidstagefrighthc
-FORCE_SHARED_LIB = 1
 
 # Don't use STL wrappers; this isn't Gecko code
 STL_FLAGS =
 
 # must link statically with the CRT; this isn't Gecko code
 USE_STATIC_LIBS = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/media/omx-plugin/lib/hc/libstagefright/moz.build
+++ b/media/omx-plugin/lib/hc/libstagefright/moz.build
@@ -7,8 +7,9 @@ NO_DIST_INSTALL = True
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
     SOURCES += [
         'libstagefright.cpp',
     ]
 
 LIBRARY_NAME = 'stagefright'
 
+FORCE_SHARED_LIB = True
--- a/media/omx-plugin/lib/ics/libstagefright/Makefile.in
+++ b/media/omx-plugin/lib/ics/libstagefright/Makefile.in
@@ -7,17 +7,16 @@
 #     http://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 MODULE_NAME = libandroidstagefright
-FORCE_SHARED_LIB = 1
 
 # Don't use STL wrappers; this isn't Gecko code
 STL_FLAGS =
 
 # must link statically with the CRT; this isn't Gecko code
 USE_STATIC_LIBS = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/media/omx-plugin/lib/ics/libstagefright/moz.build
+++ b/media/omx-plugin/lib/ics/libstagefright/moz.build
@@ -7,8 +7,9 @@ NO_DIST_INSTALL = True
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
     SOURCES += [
         'libstagefright.cpp',
     ]
 
 LIBRARY_NAME = 'stagefright'
 
+FORCE_SHARED_LIB = True
--- a/media/omx-plugin/lib/ics/libutils/Makefile.in
+++ b/media/omx-plugin/lib/ics/libutils/Makefile.in
@@ -7,17 +7,16 @@
 #     http://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 MODULE_NAME = libandroidutils
-FORCE_SHARED_LIB = 1
 
 # Don't use STL wrappers; this isn't Gecko code
 STL_FLAGS =
 
 # must link statically with the CRT; this isn't Gecko code
 USE_STATIC_LIBS = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/media/omx-plugin/lib/ics/libutils/moz.build
+++ b/media/omx-plugin/lib/ics/libutils/moz.build
@@ -7,8 +7,9 @@ NO_DIST_INSTALL = True
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
     SOURCES += [
         'libutils.cpp',
     ]
 
 LIBRARY_NAME = 'utils'
 
+FORCE_SHARED_LIB = True
--- a/media/omx-plugin/moz.build
+++ b/media/omx-plugin/moz.build
@@ -15,8 +15,9 @@
 # limitations under the License.
 
 SOURCES += [
     'OmxPlugin.cpp',
 ]
 
 LIBRARY_NAME = 'omxplugin'
 
+FORCE_SHARED_LIB = True
--- a/memory/mozalloc/Makefile.in
+++ b/memory/mozalloc/Makefile.in
@@ -5,20 +5,16 @@
 
 STL_FLAGS	=
 ifdef _MSC_VER
 STL_FLAGS	= -D_HAS_EXCEPTIONS=0
 endif
 
 DIST_INSTALL 	= 1
 
-ifneq (gonk,$(MOZ_WIDGET_TOOLKIT))
-FORCE_SHARED_LIB= 1
-endif
-
 ifeq (,$(filter-out OS2,$(OS_ARCH)))
 # The strndup declaration in string.h is in an ifdef __USE_GNU section
 DEFINES		+= -D_GNU_SOURCE
 endif
 
 ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
 SDK_LIBRARY = $(IMPORT_LIBRARY)
 else
--- a/memory/mozalloc/moz.build
+++ b/memory/mozalloc/moz.build
@@ -37,8 +37,10 @@ SOURCES += [
     'mozalloc_abort.cpp',
     'mozalloc_oom.cpp',
 ]
 
 LIBRARY_NAME = 'mozalloc'
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
     FORCE_STATIC_LIB = True
+else:
+    FORCE_SHARED_LIB = True
--- a/memory/replace/dmd/Makefile.in
+++ b/memory/replace/dmd/Makefile.in
@@ -1,15 +1,13 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_SHARED_LIB= 1
-
 DEFINES 	+= -DMOZ_NO_MOZALLOC
 
 # Disable mozglue.
 WRAP_LDFLAGS 	=
 MOZ_GLUE_LDFLAGS=
 
 STL_FLAGS 	=
 
--- a/memory/replace/dmd/moz.build
+++ b/memory/replace/dmd/moz.build
@@ -15,8 +15,9 @@ SOURCES += [
 ]
 
 SOURCES += [
     '../../../nsprpub/lib/libc/src/strcpy.c',
 ]
 
 LIBRARY_NAME = 'dmd'
 
+FORCE_SHARED_LIB = True
deleted file mode 100644
--- a/memory/replace/dummy/Makefile.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-FORCE_SHARED_LIB = 1
--- a/memory/replace/dummy/moz.build
+++ b/memory/replace/dummy/moz.build
@@ -6,8 +6,9 @@
 NO_DIST_INSTALL = True
 
 SOURCES += [
     'dummy_replace_malloc.c',
 ]
 
 LIBRARY_NAME = 'replace_malloc'
 
+FORCE_SHARED_LIB = True
--- a/memory/replace/jemalloc/Makefile.in
+++ b/memory/replace/jemalloc/Makefile.in
@@ -1,14 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_SHARED_LIB = 1
-
 SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/jemalloc)
 DEFINES += -DMOZ_JEMALLOC3 -DMOZ_REPLACE_JEMALLOC
 LOCAL_INCLUDES += -I../../jemalloc/src/include
 ifdef _MSC_VER
 LOCAL_INCLUDES += -I$(topsrcdir)/memory/jemalloc/src/include/msvc_compat
 endif
 
 VPATH += $(topsrcdir)/memory/build
--- a/memory/replace/jemalloc/moz.build
+++ b/memory/replace/jemalloc/moz.build
@@ -15,8 +15,9 @@ SOURCES += [
 # Android.
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
     SOURCES += [
         'pthread_atfork.c',
     ]
 
 LIBRARY_NAME = 'replace_jemalloc'
 
+FORCE_SHARED_LIB = True
--- a/mozglue/build/Makefile.in
+++ b/mozglue/build/Makefile.in
@@ -1,20 +1,17 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIST_INSTALL = 1
 
-# Build mozglue as a shared lib on Windows, OSX and Android.
-# If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
-ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET)))
-FORCE_SHARED_LIB = 1
-endif
+# For FORCE_SHARED_LIB
+include $(topsrcdir)/config/config.mk
 
 ifneq (1_1,$(MOZ_MEMORY)_$(or $(MOZ_NATIVE_JEMALLOC),$(FORCE_SHARED_LIB)))
 
 ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
 SDK_LIBRARY = $(IMPORT_LIBRARY)
 else
 ifdef FORCE_SHARED_LIB
 SDK_LIBRARY = $(SHARED_LIBRARY)
--- a/mozglue/build/moz.build
+++ b/mozglue/build/moz.build
@@ -2,24 +2,22 @@
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # Build mozglue as a shared lib on Windows, OSX and Android.
 # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
 if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
-    # TODO: These should be the all-caps variables when FORCE_SHARED_LIB and
-    # FORCE_STATIC_LIB are ported over
-    force_shared_lib = 1
+    FORCE_SHARED_LIB = True
 else:
-    force_shared_lib = 0
+    FORCE_SHARED_LIB = False
     FORCE_STATIC_LIB = True
 
-if CONFIG['MOZ_MEMORY'] and (CONFIG['MOZ_NATIVE_JEMALLOC'] or force_shared_lib):
+if CONFIG['MOZ_MEMORY'] and (CONFIG['MOZ_NATIVE_JEMALLOC'] or FORCE_SHARED_LIB):
     pass
     # TODO: SHARED_LIBRARY_LIBS go here
 else:
     # Temporary, until bug 662814 lands
     NO_VISIBILITY_FLAGS = True
     SOURCES += [
         'dummy.cpp',
     ]
--- a/security/build/Makefile.in
+++ b/security/build/Makefile.in
@@ -1,20 +1,16 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 CC_WRAPPER =
 CXX_WRAPPER =
 
-ifdef MOZ_FOLD_LIBS
-FORCE_SHARED_LIB = 1
-endif
-
 default::
 
 include $(topsrcdir)/config/makefiles/functions.mk
 
 NSS_LIBS = \
   nss3 \
   nssutil3 \
   smime3 \
--- a/security/build/moz.build
+++ b/security/build/moz.build
@@ -2,8 +2,10 @@
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 if CONFIG['MOZ_FOLD_LIBS']:
     # TODO: The library name can be changed when bug 845217 is fixed.
     LIBRARY_NAME = 'nss3'
+
+    FORCE_SHARED_LIB = True
--- a/security/sandbox/win/src/sandboxbroker/Makefile.in
+++ b/security/sandbox/win/src/sandboxbroker/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
-FORCE_SHARED_LIB = 1
 MOZ_GLUE_LDFLAGS =
 STL_FLAGS =
 
 LOCAL_INCLUDES += \
     -I$(topsrcdir)/security \
     -I$(topsrcdir)/security/sandbox \
     $(NULL)
 
--- a/security/sandbox/win/src/sandboxbroker/moz.build
+++ b/security/sandbox/win/src/sandboxbroker/moz.build
@@ -9,8 +9,10 @@ EXPORT_LIBRARY = True
 
 SOURCES += [
     'sandboxBroker.cpp',
 ]
 
 EXPORTS += [
     'sandboxBroker.h',
 ]
+
+FORCE_SHARED_LIB = True
--- a/toolkit/components/ctypes/tests/Makefile.in
+++ b/toolkit/components/ctypes/tests/Makefile.in
@@ -1,14 +1,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SHORT_LIBNAME = jscttest
-FORCE_SHARED_LIB = 1
 
 LOCAL_INCLUDES = \
     -I$(topsrcdir)/js/src/ctypes \
     $(NULL)
 
 EXTRA_DSO_LDOPTS += $(MOZALLOC_LIB)
 
 xpctestdir = $(testxpcobjdir)/$(relativesrcdir)/unit
--- a/toolkit/components/ctypes/tests/moz.build
+++ b/toolkit/components/ctypes/tests/moz.build
@@ -10,8 +10,9 @@ XPCSHELL_TESTS_MANIFESTS += ['unit/xpcsh
 SOURCES += [
     'jsctypes-test-errno.cpp',
     'jsctypes-test-finalizer.cpp',
     'jsctypes-test.cpp',
 ]
 
 LIBRARY_NAME = 'jsctypes-test'
 
+FORCE_SHARED_LIB = True
--- a/toolkit/crashreporter/injector/Makefile.in
+++ b/toolkit/crashreporter/injector/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_SHARED_LIB = 1
 USE_STATIC_LIBS = 1
 STL_FLAGS =
 MOZ_GLUE_LDFLAGS =
 
 include $(topsrcdir)/config/rules.mk
 
 LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src
 ifndef GNU_CC
--- a/toolkit/crashreporter/injector/moz.build
+++ b/toolkit/crashreporter/injector/moz.build
@@ -7,8 +7,9 @@
 SOURCES += [
     'injector.cpp',
 ]
 
 LIBRARY_NAME = 'breakpadinjector'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+FORCE_SHARED_LIB = True
--- a/toolkit/crashreporter/test/Makefile.in
+++ b/toolkit/crashreporter/test/Makefile.in
@@ -1,15 +1,13 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_SHARED_LIB = 1
-
 VPATH += \
   $(srcdir)/../google-breakpad/src/processor/ \
   $(srcdir)/../google-breakpad/src/common/ \
   $(topsrcdir)/build/ \
   $(NULL)
 
 LOCAL_INCLUDES += \
   -I$(srcdir)/../google-breakpad/src/ \
--- a/toolkit/crashreporter/test/moz.build
+++ b/toolkit/crashreporter/test/moz.build
@@ -16,8 +16,10 @@ SOURCES += [
     'nsTestCrasher.cpp',
 ]
 
 LIBRARY_NAME = 'testcrasher'
 
 EXTRA_JS_MODULES += [
     'CrashTestUtils.jsm',
 ]
+
+FORCE_SHARED_LIB = True
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_SHARED_LIB = 1
 MOZILLA_INTERNAL_API = 1
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
 # This is going to be a framework named "XUL", not an ordinary library named
 # "libxul.dylib"
 SHARED_LIBRARY_NAME=XUL
 # Setting MAKE_FRAMEWORK makes DLL_PREFIX and DLL_SUFFIX be ignored when
 # setting SHARED_LIBRARY; we need to leave DLL_PREFIX and DLL_SUFFIX
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -14,8 +14,10 @@ SOURCES += [
 ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     SOURCES += [
         'nsDllMain.cpp',
     ]
 
 MSVC_ENABLE_PGO = True
+
+FORCE_SHARED_LIB = True
deleted file mode 100644
--- a/toolkit/library/winvccorlib/Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this file,
-# You can obtain one at http://mozilla.org/MPL/2.0/.
-
-# When we're linking GTest we recurse into this directory but don't need
-# to generate this library
-ifndef LINK_GTEST
-
-FORCE_SHARED_LIB=1
-
-endif
--- a/toolkit/library/winvccorlib/moz.build
+++ b/toolkit/library/winvccorlib/moz.build
@@ -1,13 +1,17 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+# When we're linking GTest we recurse into this directory but don't need
+# to generate this library
 if not CONFIG['LINK_GTEST']:
     LIBRARY_NAME = 'dummyvccorlib'
 
+    FORCE_SHARED_LIB = True
+
 SOURCES += [
     'dummyvccorlib.cpp',
 ]
 
--- a/toolkit/system/dbus/Makefile.in
+++ b/toolkit/system/dbus/Makefile.in
@@ -1,14 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_SHARED_LIB = 1
-
 EXTRA_DSO_LDOPTS = \
 	$(XPCOM_GLUE_LDOPTS) \
 	$(NSPR_LIBS) \
 	$(MOZ_DBUS_GLIB_LIBS) \
 	$(NULL)
                 
 include $(topsrcdir)/config/rules.mk
 
--- a/toolkit/system/dbus/moz.build
+++ b/toolkit/system/dbus/moz.build
@@ -9,8 +9,9 @@ SOURCES += [
     'nsDBusService.cpp',
     'nsNetworkManagerListener.cpp',
 ]
 
 LIBRARY_NAME = 'dbusservice'
 
 IS_COMPONENT = True
 
+FORCE_SHARED_LIB = True
--- a/toolkit/system/gnome/Makefile.in
+++ b/toolkit/system/gnome/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_SHARED_LIB = 1
 EXTRA_DSO_LDOPTS += \
 		$(XPCOM_GLUE_LDOPTS) \
 		$(XPCOM_FROZEN_LDOPTS) \
 		$(NSPR_LIBS) \
 		$(MOZ_GCONF_LIBS) \
 		$(MOZ_GNOMEVFS_LIBS) \
 		$(GLIB_LIBS) \
 		$(MOZ_GIO_LIBS) \
--- a/toolkit/system/gnome/moz.build
+++ b/toolkit/system/gnome/moz.build
@@ -24,8 +24,9 @@ if CONFIG['MOZ_ENABLE_GIO']:
         'nsGSettingsService.cpp',
     ]
 
 LIBRARY_NAME = 'mozgnome'
 
 FAIL_ON_WARNINGS = True
 IS_COMPONENT = True
 
+FORCE_SHARED_LIB = True
--- a/tools/jprof/stub/Makefile.in
+++ b/tools/jprof/stub/Makefile.in
@@ -1,14 +1,12 @@
 #! gmake
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_SHARED_LIB = 1
-
 # override optimization
 MOZ_OPTIMIZE_FLAGS = -fno-omit-frame-pointer
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES		+= -D_IMPL_JPROF_API
--- a/tools/jprof/stub/moz.build
+++ b/tools/jprof/stub/moz.build
@@ -11,8 +11,9 @@ EXPORTS += [
 SOURCES += [
     'libmalloc.cpp',
 ]
 
 LIBRARY_NAME = 'jprof'
 
 EXPORT_LIBRARY = True
 
+FORCE_SHARED_LIB = True
--- a/xpcom/tests/bug656331_component/Makefile.in
+++ b/xpcom/tests/bug656331_component/Makefile.in
@@ -1,17 +1,15 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # Blatantly copied from xpcom/tests/component.
 
-FORCE_SHARED_LIB = 1
-
 unittestlocation = xpcom/tests/unit
 
 MANIFEST = bug656331.manifest
 MANIFEST_PATH = $(testxpcobjdir)/$(unittestlocation)
 PP_TARGETS += MANIFEST
 
 EXTRA_DSO_LDOPTS = \
   $(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
--- a/xpcom/tests/bug656331_component/moz.build
+++ b/xpcom/tests/bug656331_component/moz.build
@@ -9,8 +9,9 @@ NO_DIST_INSTALL = True
 SOURCES += [
     'TestComponent.cpp',
 ]
 
 LIBRARY_NAME = 'test656331'
 
 IS_COMPONENT = True
 
+FORCE_SHARED_LIB = True
--- a/xpcom/tests/component/Makefile.in
+++ b/xpcom/tests/component/Makefile.in
@@ -1,15 +1,13 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_SHARED_LIB = 1
-
 unittestlocation = xpcom/tests/unit
 
 MANIFEST = testcomponent.manifest
 MANIFEST_PATH = $(testxpcobjdir)/$(unittestlocation)
 PP_TARGETS += MANIFEST
 
 EXTRA_DSO_LDOPTS = \
 		$(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
--- a/xpcom/tests/component/moz.build
+++ b/xpcom/tests/component/moz.build
@@ -9,8 +9,9 @@ NO_DIST_INSTALL = True
 SOURCES += [
     'TestComponent.cpp',
 ]
 
 LIBRARY_NAME = 'testcomponent'
 
 IS_COMPONENT = True
 
+FORCE_SHARED_LIB = True
--- a/xpcom/tests/component_no_aslr/Makefile.in
+++ b/xpcom/tests/component_no_aslr/Makefile.in
@@ -1,15 +1,13 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_SHARED_LIB = 1
-
 unittestlocation = xpcom/tests/unit
 
 MANIFEST = testcompnoaslr.manifest
 MANIFEST_PATH = $(testxpcobjdir)/$(unittestlocation)
 PP_TARGETS += MANIFEST
 
 EXTRA_DSO_LDOPTS = \
 		$(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
--- a/xpcom/tests/component_no_aslr/moz.build
+++ b/xpcom/tests/component_no_aslr/moz.build
@@ -9,8 +9,9 @@ NO_DIST_INSTALL = True
 SOURCES += [
     'TestComponent.cpp',
 ]
 
 LIBRARY_NAME = 'testcompnoaslr'
 
 IS_COMPONENT = True
 
+FORCE_SHARED_LIB = True