From 3e3afccd684f750472be8ea8a3ecb695d4d13e9b Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Wed, 6 Aug 2014 07:26:05 +0900 Subject: [PATCH] Bug 1045783 - Move HOST_EXTRA_LIBS to moz.build as HOST_OS_LIBS. r=mshal --- config/config.mk | 1 + modules/libmar/tool/Makefile.in | 4 ---- modules/libmar/tool/moz.build | 5 +++++ mozglue/linker/Makefile.in | 2 -- mozglue/linker/moz.build | 4 ++++ other-licenses/bsdiff/Makefile.in | 8 -------- other-licenses/bsdiff/moz.build | 9 ++++++++- 7 files changed, 18 insertions(+), 15 deletions(-) diff --git a/config/config.mk b/config/config.mk index 4db935c78bf..b7ea46a535e 100644 --- a/config/config.mk +++ b/config/config.mk @@ -49,6 +49,7 @@ _MOZBUILD_EXTERNAL_VARIABLES := \ FINAL_LIBRARY \ HOST_CSRCS \ HOST_CMMSRCS \ + HOST_EXTRA_LIBS \ HOST_LIBRARY_NAME \ HOST_PROGRAM \ HOST_SIMPLE_PROGRAMS \ diff --git a/modules/libmar/tool/Makefile.in b/modules/libmar/tool/Makefile.in index e3d8c80a471..571f17e1d8e 100644 --- a/modules/libmar/tool/Makefile.in +++ b/modules/libmar/tool/Makefile.in @@ -28,10 +28,6 @@ EXTRA_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 diff --git a/modules/libmar/tool/moz.build b/modules/libmar/tool/moz.build index eb6173ff8d7..a24aa5945a9 100644 --- a/modules/libmar/tool/moz.build +++ b/modules/libmar/tool/moz.build @@ -46,3 +46,8 @@ elif CONFIG['OS_ARCH'] == 'Darwin': OS_LIBS += [ '-framework Security', ] + +if CONFIG['HOST_OS_ARCH'] == 'WINNT': + HOST_OS_LIBS += [ + 'ws2_32', + ] diff --git a/mozglue/linker/Makefile.in b/mozglue/linker/Makefile.in index aa471b62d23..a5b22176910 100644 --- a/mozglue/linker/Makefile.in +++ b/mozglue/linker/Makefile.in @@ -2,8 +2,6 @@ # 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)) diff --git a/mozglue/linker/moz.build b/mozglue/linker/moz.build index 623b4eef01c..4b7ccdcf3ad 100644 --- a/mozglue/linker/moz.build +++ b/mozglue/linker/moz.build @@ -28,3 +28,7 @@ DEFINES['IMPL_MFBT'] = True DISABLE_STL_WRAPPING = True TEST_DIRS += ['tests'] + +HOST_OS_LIBS += [ + 'z', +] diff --git a/other-licenses/bsdiff/Makefile.in b/other-licenses/bsdiff/Makefile.in index d378e31c48e..7d748e9181a 100644 --- a/other-licenses/bsdiff/Makefile.in +++ b/other-licenses/bsdiff/Makefile.in @@ -25,14 +25,6 @@ # 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) diff --git a/other-licenses/bsdiff/moz.build b/other-licenses/bsdiff/moz.build index 3df2cfa0bdd..a341e449613 100644 --- a/other-licenses/bsdiff/moz.build +++ b/other-licenses/bsdiff/moz.build @@ -10,11 +10,18 @@ HOST_SOURCES += [ 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', ]