Bug 1045783 - Move HOST_EXTRA_LIBS to moz.build as HOST_OS_LIBS. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 06 Aug 2014 07:26:05 +0900
changeset 198071 2aa5813d28081c066977f1e55b22f4c1104fb348
parent 198070 98614c9969ce8ba59350f978514f60706e18e03b
child 198072 4e9cd601aa23b0a0546d5a83cd9d2a2f8db5b16a
push idunknown
push userunknown
push dateunknown
reviewersmshal
bugs1045783
milestone34.0a1
Bug 1045783 - Move HOST_EXTRA_LIBS to moz.build as HOST_OS_LIBS. r=mshal
config/config.mk
modules/libmar/tool/Makefile.in
modules/libmar/tool/moz.build
mozglue/linker/Makefile.in
mozglue/linker/moz.build
other-licenses/bsdiff/Makefile.in
other-licenses/bsdiff/moz.build
--- a/config/config.mk
+++ b/config/config.mk
@@ -44,16 +44,17 @@ endif
   EXTRA_JS_MODULES \
   EXTRA_PP_COMPONENTS \
   EXTRA_PP_JS_MODULES \
   FORCE_SHARED_LIB \
   FORCE_STATIC_LIB \
   FINAL_LIBRARY \
   HOST_CSRCS \
   HOST_CMMSRCS \
+  HOST_EXTRA_LIBS \
   HOST_LIBRARY_NAME \
   HOST_PROGRAM \
   HOST_SIMPLE_PROGRAMS \
   IS_COMPONENT \
   JAR_MANIFEST \
   JAVA_JAR_TARGETS \
   LD_VERSION_SCRIPT \
   LIBRARY_NAME \
--- a/modules/libmar/tool/Makefile.in
+++ b/modules/libmar/tool/Makefile.in
@@ -23,20 +23,16 @@ ifdef MOZ_ENABLE_SIGNMAR
 # on parts of nss that don't matter.
 EXTRA_LIBS += \
   $(DIST)/lib/$(LIB_PREFIX)nss3.$(LIB_SUFFIX) \
   $(DIST)/lib/$(LIB_PREFIX)nssutil3.$(LIB_SUFFIX) \
   $(NSPR_LIBS) \
   $(NULL)
 endif
 
-ifeq ($(HOST_OS_ARCH),WINNT)
-HOST_EXTRA_LIBS += $(call EXPAND_LIBNAME,ws2_32)
-endif
-
 include $(topsrcdir)/config/rules.mk
 
 ifdef CROSS_COMPILE
 ifdef HOST_NSPR_MDCPUCFG
 HOST_CFLAGS += -DMDCPUCFG=$(HOST_NSPR_MDCPUCFG)
 CFLAGS += -DMDCPUCFG=$(HOST_NSPR_MDCPUCFG)
 endif
 endif
--- a/modules/libmar/tool/moz.build
+++ b/modules/libmar/tool/moz.build
@@ -41,8 +41,13 @@ if CONFIG['OS_ARCH'] == 'WINNT':
         OS_LIBS += [
             'crypt32',
             'advapi32',
         ]
 elif CONFIG['OS_ARCH'] == 'Darwin':
     OS_LIBS += [
       '-framework Security',
     ]
+
+if CONFIG['HOST_OS_ARCH'] == 'WINNT':
+    HOST_OS_LIBS += [
+        'ws2_32',
+    ]
--- a/mozglue/linker/Makefile.in
+++ b/mozglue/linker/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/.
 
-HOST_EXTRA_LIBS += -lz
-
 include $(topsrcdir)/config/rules.mk
 
 ifeq (arm,$(TARGET_CPU))
 ifdef MOZ_THUMB2
 HOST_CXXFLAGS += -DTARGET_THUMB
 else
 HOST_CXXFLAGS += -DTARGET_ARM
 endif
--- a/mozglue/linker/moz.build
+++ b/mozglue/linker/moz.build
@@ -23,8 +23,12 @@ HOST_PROGRAM = 'szip'
 
 FINAL_LIBRARY = 'mozglue'
 
 DEFINES['IMPL_MFBT'] = True
 
 DISABLE_STL_WRAPPING = True
 
 TEST_DIRS += ['tests']
+
+HOST_OS_LIBS += [
+    'z',
+]
--- a/other-licenses/bsdiff/Makefile.in
+++ b/other-licenses/bsdiff/Makefile.in
@@ -20,19 +20,11 @@
 # the provisions above, a recipient may use your version of this file under
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 # This program is output to dist/host/bin because it is only needed by the
 # build system and is not intended to be included in Mozilla distributions.
 
-ifdef MOZ_NATIVE_BZ2
-HOST_EXTRA_LIBS += $(MOZ_BZ2_LIBS)
-endif
-
-ifeq ($(HOST_OS_ARCH),WINNT)
-HOST_EXTRA_LIBS += $(call EXPAND_LIBNAME,Ws2_32)
-endif
-
 include $(topsrcdir)/config/rules.mk
 
 HOST_CXXFLAGS += $(MOZ_BZ2_CFLAGS)
--- a/other-licenses/bsdiff/moz.build
+++ b/other-licenses/bsdiff/moz.build
@@ -5,17 +5,24 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 HOST_SOURCES += [
     'bsdiff.c',
 ]
 
 HOST_PROGRAM = 'mbsdiff'
 
-if not CONFIG['MOZ_NATIVE_BZ2']:
+if CONFIG['MOZ_NATIVE_BZ2']:
+    HOST_OS_LIBS += CONFIG['MOZ_BZ2_LIBS']
+else:
     HOST_USE_LIBS += [
         'hostbz2',
     ]
 
+if CONFIG['HOST_OS_ARCH'] == 'WINNT':
+    HOST_OS_LIBS += [
+        'ws2_32',
+    ]
+
 LOCAL_INCLUDES += [
     '/toolkit/mozapps/update/updater',
 ]