From 5a84dbc9137a85352db6ee71c7a9fb110d4aa85e Mon Sep 17 00:00:00 2001 From: Kaizhen Li Date: Wed, 11 Sep 2013 09:46:06 +0800 Subject: [PATCH] Bug 912908 - Build xpcom/sample as shared library. r=joey --- xpcom/sample/Makefile.in | 9 +++++++++ xpcom/sample/moz.build | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/xpcom/sample/Makefile.in b/xpcom/sample/Makefile.in index efa358e1d3ad..a16a1287506d 100644 --- a/xpcom/sample/Makefile.in +++ b/xpcom/sample/Makefile.in @@ -10,6 +10,15 @@ 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 diff --git a/xpcom/sample/moz.build b/xpcom/sample/moz.build index 47e64891fed5..cd03dba375e7 100644 --- a/xpcom/sample/moz.build +++ b/xpcom/sample/moz.build @@ -27,6 +27,10 @@ EXTRA_COMPONENTS += [ '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'