Bug 736564 - Ship mozglue and jemalloc libraries in the SDK. r=bsmedberg,r=ted

As one import library on Windows, as one shared library on OSX and Android,
and as two separate static libraries on systems where mozglue is a static
library.
This commit is contained in:
Mike Hommey 2012-05-03 08:36:12 +02:00
Родитель 1d3450c3e6
Коммит f9c2c3662c
3 изменённых файлов: 32 добавлений и 10 удалений

Просмотреть файл

@ -7187,7 +7187,13 @@ elif test "${OS_TARGET}" = "WINNT" -o "${OS_TARGET}" = "Darwin" -o "${OS_TARGET}
fi
else
dnl On other Unix systems, we only want to link executables against mozglue
MOZ_GLUE_PROGRAM_LDFLAGS='$(MKSHLIB_FORCE_ALL) $(call EXPAND_LIBNAME_PATH,mozglue,$(LIBXUL_DIST)/lib) $(MKSHLIB_UNFORCE_ALL)'
MOZ_GLUE_PROGRAM_LDFLAGS='$(MKSHLIB_FORCE_ALL) $(call EXPAND_LIBNAME_PATH,mozglue,$(LIBXUL_DIST)/lib)'
dnl On other Unix systems, where mozglue is a static library, jemalloc is
dnl separated for the SDK, so we need to add it here.
if test "$MOZ_MEMORY" = 1; then
MOZ_GLUE_PROGRAM_LDFLAGS="$MOZ_GLUE_PROGRAM_LDFLAGS "'$(call EXPAND_LIBNAME_PATH,jemalloc,$(LIBXUL_DIST)/lib)'
fi
MOZ_GLUE_PROGRAM_LDFLAGS="$MOZ_GLUE_PROGRAM_LDFLAGS "'$(MKSHLIB_UNFORCE_ALL)'
if test -n "$GNU_CC"; then
dnl And we need mozglue symbols to be exported.
MOZ_GLUE_PROGRAM_LDFLAGS="$MOZ_GLUE_PROGRAM_LDFLAGS -rdynamic"

Просмотреть файл

@ -53,6 +53,10 @@ CSRCS = jemalloc.c
EXPORTS = jemalloc.h jemalloc_types.h
LIBRARY_NAME = jemalloc
FORCE_STATIC_LIB= 1
ifdef MOZ_GLUE_PROGRAM_LDFLAGS
SDK_LIBRARY = $(REAL_LIBRARY)
DIST_INSTALL = 1
endif
ifeq ($(OS_ARCH),SunOS)
ifndef GNU_CC

Просмотреть файл

@ -47,15 +47,6 @@ MODULE = mozglue
LIBRARY_NAME = mozglue
DIST_INSTALL = 1
ifdef MOZ_MEMORY
SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,memory,$(DEPTH)/memory/build)
SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/jemalloc)
else
# Temporary, until bug 662814 lands
VISIBILITY_FLAGS =
CPPSRCS = dummy.cpp
endif
# 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)))
@ -64,6 +55,27 @@ else
FORCE_STATIC_LIB = 1
endif
# Keep jemalloc separated when mozglue is statically linked
ifeq (1_1,$(MOZ_MEMORY)_$(FORCE_SHARED_LIB))
SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,memory,$(DEPTH)/memory/build)
SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/jemalloc)
else
# Temporary, until bug 662814 lands
VISIBILITY_FLAGS =
CPPSRCS = dummy.cpp
ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
SDK_LIBRARY = $(IMPORT_LIBRARY)
else
ifdef FORCE_SHARED_LIB
SDK_LIBRARY = $(SHARED_LIBRARY)
else
SDK_LIBRARY = $(REAL_LIBRARY)
endif
endif
endif
MOZ_GLUE_LDFLAGS = # Don't link against ourselves
ifeq (WINNT,$(OS_TARGET))