Bug 912908 - Build xpcom/sample as shared library. r=joey
authorKaizhen Li <kli@mozilla.com>
Wed, 11 Sep 2013 09:46:06 +0800
changeset 159473 2a19516ee70081fb9fee8799c08243513815c6b5
parent 159472 e08f432b9bab78e024595d3021df278b3714b349
child 159474 b713e1beae2273dc02863adc9f44787ba156bd67
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoey
bugs912908
milestone26.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 912908 - Build xpcom/sample as shared library. r=joey
xpcom/sample/Makefile.in
xpcom/sample/moz.build
--- a/xpcom/sample/Makefile.in
+++ b/xpcom/sample/Makefile.in
@@ -5,16 +5,25 @@
 
 # On OS/2, SHORT_LIBNAME is used to generate a library with an 8.3 filename,
 # e.g. dist/bin/components/xpcomsmp.dll
 SHORT_LIBNAME	= xpcomsmp
 
 # IS_COMPONENT indicates that this makefile builds a component shared library.
 IS_COMPONENT	= 1
 
+# NOTE:
+####################################################################
+# Variable assignment(s) should be maintained within moz.build files 
+# whenever possible. Migrate existing Makefile.in content into the 
+# corresponding moz.build file, then run 'mach configure' to determine 
+# if the variable is suppported. If not supported / not yet converted- 
+# open a Build::Config bug requesting conversion of the variable.
+####################################################################
+
 # If this is Makefile builds a component, MODULE_NAME must match the module
 # name specified in NS_IMPL_NSGETMODULE
 MODULE_NAME	= nsSampleModule
 
 
 # EXTRA_DSO_LDOPTS specifies linker flags when building a shared library
 # from this Makefile. We link against the "dependent glue" and against the
 # frozen XPCOM shared library.
--- a/xpcom/sample/moz.build
+++ b/xpcom/sample/moz.build
@@ -22,12 +22,16 @@ CPP_SOURCES += [
 
 # EXTRA_COMPONENTS installs components written JavaScript to
 # dist/bin/components
 EXTRA_COMPONENTS += [
     'nsSample.js',
     'nsSample.manifest',
 ]
 
+# FORCE_SHARED_LIB tells the build system that this should be a shared library,
+# even in a static build.
+FORCE_SHARED_LIB = True
+
 # LIBRARY_NAME names the library generated by this makefile,
 # i.e. dist/bin/components/libxpcomsample.so
 LIBRARY_NAME = 'xpcomsample'