Bug 701371 - Rename mozutils to mozglue, and move it to top-level. r=khuey

--HG--
rename : memory/mozutils/Makefile.in => mozglue/Makefile.in
rename : memory/mozutils/Makefile.in => mozglue/build/Makefile.in
rename : memory/mozutils/dummy.cpp => mozglue/build/dummy.cpp
rename : memory/mozutils/fixcrt.py => mozglue/build/fixcrt.py
rename : memory/mozutils/mozutils.def.in => mozglue/build/mozutils.def.in
This commit is contained in:
Mike Hommey 2011-12-28 08:24:02 +01:00
parent b7210dd88e
commit 00bf052883
34 changed files with 137 additions and 132 deletions

View File

@ -59,18 +59,27 @@ TIERS += base
# tier "base" - basic setup
#
tier_base_dirs = \
config \
build \
probes \
mfbt \
$(NULL)
config \
build \
probes \
mfbt \
$(NULL)
ifndef LIBXUL_SDK
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
tier_base_dirs += other-licenses/android other-licenses/skia-npapi
tier_base_dirs += \
other-licenses/android \
other-licenses/skia-npapi \
$(NULL)
endif
tier_base_dirs += memory
ifdef MOZ_MEMORY
tier_base_dirs += memory/jemalloc
endif
tier_base_dirs += \
mozglue \
memory/mozalloc \
$(NULL)
endif
ifdef COMPILE_ENVIRONMENT

View File

@ -74,9 +74,9 @@ extensions/Makefile
if [ ! "$LIBXUL_SDK" ]; then
add_makefiles "
memory/Makefile
memory/mozalloc/Makefile
memory/mozutils/Makefile
mozglue/Makefile
mozglue/build/Makefile
"
if [ "$MOZ_MEMORY" ]; then
add_makefiles "

View File

@ -82,7 +82,7 @@
@BINPATH@/AndroidManifest.xml
@BINPATH@/resources.arsc
@BINPATH@/classes.dex
@BINPATH@/@DLL_PREFIX@mozutils@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@
@BINPATH@/res/drawable
@BINPATH@/res/drawable-hdpi
@BINPATH@/res/layout

View File

@ -1 +1,2 @@
README.txt
@DLL_PREFIX@mozutils@DLL_SUFFIX@

View File

@ -44,7 +44,7 @@
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozutils@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@
#ifdef XP_MACOSX
@BINPATH@/XUL
#else

View File

@ -10,6 +10,7 @@
@DLL_PREFIX@xpistub@DLL_SUFFIX@
@DLL_PREFIX@zlib@DLL_SUFFIX@
@DLL_PREFIX@jemalloc@DLL_SUFFIX@
@DLL_PREFIX@mozutils@DLL_SUFFIX@
#ifdef MOZ_STATIC_JS
@DLL_PREFIX@mozjs@DLL_SUFFIX@
#endif

View File

@ -62,7 +62,7 @@ CPPSRCS = crashinject.cpp
endif # ENABLE_TESTS
MOZ_UTILS_LDFLAGS =
MOZ_GLUE_LDFLAGS =
include $(topsrcdir)/config/rules.mk

View File

@ -50,6 +50,6 @@ USE_STATIC_LIBS = 1
CPPSRCS = crashinjectdll.cpp
MOZ_UTILS_LDFLAGS =
MOZ_GLUE_LDFLAGS =
include $(topsrcdir)/config/rules.mk

View File

@ -51,6 +51,6 @@ USE_STATIC_LIBS = 1
CPPSRCS = $(LIBRARY_NAME).cpp
MOZ_UTILS_LDFLAGS =
MOZ_GLUE_LDFLAGS =
include $(topsrcdir)/config/rules.mk

View File

@ -631,8 +631,8 @@ MOZ_TOOLS_DIR = @MOZ_TOOLS_DIR@
MOZ_QUANTIFY = @MOZ_QUANTIFY@
MSMANIFEST_TOOL = @MSMANIFEST_TOOL@
WIN32_REDIST_DIR = @WIN32_REDIST_DIR@
MOZ_UTILS_LDFLAGS = @MOZ_UTILS_LDFLAGS@
MOZ_UTILS_PROGRAM_LDFLAGS = @MOZ_UTILS_PROGRAM_LDFLAGS@
MOZ_GLUE_LDFLAGS = @MOZ_GLUE_LDFLAGS@
MOZ_GLUE_PROGRAM_LDFLAGS = @MOZ_GLUE_PROGRAM_LDFLAGS@
WIN32_CRT_LIBS = @WIN32_CRT_LIBS@
# This is used to pass jemalloc flags to NSS

View File

@ -243,13 +243,13 @@ endif # MOZ_DEBUG
# the Makefile wants static CRT linking.
ifeq ($(MOZ_MEMORY)_$(USE_STATIC_LIBS),1_1)
# Disable default CRT libs and add the right lib path for the linker
MOZ_UTILS_LDFLAGS=
MOZ_GLUE_LDFLAGS=
endif
endif # WINNT && !GNU_CC
ifndef MOZ_UTILS_PROGRAM_LDFLAGS
MOZ_UTILS_PROGRAM_LDFLAGS=$(MOZ_UTILS_LDFLAGS)
ifndef MOZ_GLUE_PROGRAM_LDFLAGS
MOZ_GLUE_PROGRAM_LDFLAGS=$(MOZ_GLUE_LDFLAGS)
endif
#

View File

@ -792,7 +792,7 @@ endif
# Create dependencies on static (and shared EXTRA_DSO_LIBS) libraries
DO_EXPAND_LIBS = $(foreach f,$(1),$(if $(filter %.$(LIB_SUFFIX),$(f)),$(if $(wildcard $(f).$(LIBS_DESC_SUFFIX)),$(f).$(LIBS_DESC_SUFFIX),$(if $(wildcard $(f)),$(f)))))
LIBS_DEPS = $(call DO_EXPAND_LIBS,$(filter %.$(LIB_SUFFIX),$(LIBS) $(if $(PROGRAM)$(SIMPLE_PROGRAMS),$(MOZ_UTILS_PROGRAM_LDFLAGS))))
LIBS_DEPS = $(call DO_EXPAND_LIBS,$(filter %.$(LIB_SUFFIX),$(LIBS) $(if $(PROGRAM)$(SIMPLE_PROGRAMS),$(MOZ_GLUE_PROGRAM_LDFLAGS))))
SHARED_LIBRARY_LIBS_DEPS = $(call DO_EXPAND_LIBS,$(SHARED_LIBRARY_LIBS))
HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX),$(HOST_LIBS))
DSO_LDOPTS_DEPS = $(call DO_EXPAND_LIBS,$(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS)))
@ -893,7 +893,7 @@ alltags:
$(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) $(EXE_DEF_FILE) $(RESFILE) $(GLOBAL_DEPS)
@$(RM) $@.manifest
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
$(EXPAND_LD) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
$(EXPAND_LD) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
ifdef MSMANIFEST_TOOL
@if test -f $@.manifest; then \
if test -f "$(srcdir)/$@.manifest"; then \
@ -915,10 +915,10 @@ ifdef MOZ_PROFILE_GENERATE
endif
else # !WINNT || GNU_CC
ifeq ($(CPP_PROG_LINK),1)
$(EXPAND_CCC) -o $@ $(CXXFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
$(EXPAND_CCC) -o $@ $(CXXFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
@$(call CHECK_STDCXX,$@)
else # ! CPP_PROG_LINK
$(EXPAND_CC) -o $@ $(CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
$(EXPAND_CC) -o $@ $(CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
endif # CPP_PROG_LINK
endif # WINNT && !GNU_CC
@ -964,7 +964,7 @@ endif
#
$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
$(EXPAND_LD) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
$(EXPAND_LD) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
ifdef MSMANIFEST_TOOL
@if test -f $@.manifest; then \
mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
@ -973,10 +973,10 @@ ifdef MSMANIFEST_TOOL
endif # MSVC with manifest tool
else
ifeq ($(CPP_PROG_LINK),1)
$(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
$(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
@$(call CHECK_STDCXX,$@)
else
$(EXPAND_CC) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
$(EXPAND_CC) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
endif # CPP_PROG_LINK
endif # WINNT && !GNU_CC
@ -1089,10 +1089,10 @@ ifdef DTRACE_LIB_DEPENDENT
ifndef XP_MACOSX
dtrace -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(shell $(EXPAND_LIBS) $(MOZILLA_PROBE_LIBS))
endif
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(DTRACE_PROBE_OBJ) $(MOZILLA_PROBE_LIBS) $(RESFILE) $(LDFLAGS) $(MOZ_UTILS_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(DTRACE_PROBE_OBJ) $(MOZILLA_PROBE_LIBS) $(RESFILE) $(LDFLAGS) $(MOZ_GLUE_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
@$(RM) $(DTRACE_PROBE_OBJ)
else # ! DTRACE_LIB_DEPENDENT
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(MOZ_UTILS_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(MOZ_GLUE_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
endif # DTRACE_LIB_DEPENDENT
@$(call CHECK_STDCXX,$@)

View File

@ -7144,17 +7144,17 @@ if test "$MOZ_DMD"; then
fi
if test "${OS_TARGET}" = "Android"; then
dnl On Android, we use WRAP_LDFLAGS to link everything to mozutils
dnl On Android, we use WRAP_LDFLAGS to link everything to mozglue
:
elif test "${OS_TARGET}" = "WINNT" -o "${OS_TARGET}" = "Darwin" -o "${OS_TARGET}" = "OS2"; then
dnl On Windows, OSX and OS2, we want to link all our binaries against mozutils
MOZ_UTILS_LDFLAGS='$(call EXPAND_LIBNAME_PATH,mozutils,$(LIBXUL_DIST)/lib)'
dnl On Windows, OSX and OS2, we want to link all our binaries against mozglue
MOZ_GLUE_LDFLAGS='$(call EXPAND_LIBNAME_PATH,mozglue,$(LIBXUL_DIST)/lib)'
else
dnl On other Unix systems, we only want to link executables against mozutils
MOZ_UTILS_PROGRAM_LDFLAGS='$(MKSHLIB_FORCE_ALL) $(call EXPAND_LIBNAME_PATH,mozutils,$(LIBXUL_DIST)/lib) $(MKSHLIB_UNFORCE_ALL)'
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)'
if test -n "$GNU_CC"; then
dnl And we need mozutils symbols to be exported.
MOZ_UTILS_PROGRAM_LDFLAGS="$MOZ_UTILS_PROGRAM_LDFLAGS -rdynamic"
dnl And we need mozglue symbols to be exported.
MOZ_GLUE_PROGRAM_LDFLAGS="$MOZ_GLUE_PROGRAM_LDFLAGS -rdynamic"
fi
fi
@ -7207,7 +7207,7 @@ else
AC_DEFINE(MOZ_MEMORY_LINUX)
AC_DEFINE(MOZ_MEMORY_ANDROID)
_WRAP_MALLOC=1
MOZ_UTILS_LDFLAGS=
MOZ_GLUE_LDFLAGS=
;;
*-*linux*)
AC_DEFINE(MOZ_MEMORY_LINUX)
@ -7229,11 +7229,11 @@ else
WIN32_CRTDLL_FULLPATH=`lib -nologo -list $WIN32_CRT_LIBS | grep crtdll\\.obj`
lib -NOLOGO -OUT:crtdll.obj $WIN32_CRT_LIBS -EXTRACT:$WIN32_CRTDLL_FULLPATH
if grep -q '__imp__\{0,1\}free' crtdll.obj; then
MOZ_UTILS_LDFLAGS='-LIBPATH:$(DIST)/lib -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt'
MOZ_GLUE_LDFLAGS='-LIBPATH:$(DIST)/lib -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt'
dnl Also pass this to NSPR/NSS
DLLFLAGS="$DLLFLAGS $MOZ_UTILS_LDFLAGS"
DLLFLAGS="$DLLFLAGS $MOZ_GLUE_LDFLAGS"
else
DLLFLAGS="$DLLFLAGS -LIBPATH:\$(DIST)/lib -DEFAULTLIB:mozutils"
DLLFLAGS="$DLLFLAGS -LIBPATH:\$(DIST)/lib -DEFAULTLIB:mozglue"
fi
rm crtdll.obj
@ -7252,8 +7252,8 @@ else
AC_DEFINE(HAVE_JEMALLOC_MEMALIGN)
fi # MOZ_MEMORY
AC_SUBST(MOZ_MEMORY)
AC_SUBST(MOZ_UTILS_LDFLAGS)
AC_SUBST(MOZ_UTILS_PROGRAM_LDFLAGS)
AC_SUBST(MOZ_GLUE_LDFLAGS)
AC_SUBST(MOZ_GLUE_PROGRAM_LDFLAGS)
AC_SUBST(WIN32_CRT_LIBS)
dnl Need to set this for make because NSS doesn't have configure
AC_SUBST(DLLFLAGS)
@ -7261,7 +7261,7 @@ AC_SUBST(DLLFLAGS)
dnl We need to wrap dlopen and related functions on Android because we use
dnl our own linker.
if test "$OS_TARGET" = Android; then
WRAP_LDFLAGS="${WRAP_LDFLAGS} -L$_objdir/dist/lib -lmozutils"
WRAP_LDFLAGS="${WRAP_LDFLAGS} -L$_objdir/dist/lib -lmozglue"
if test "$MOZ_WIDGET_TOOLKIT" = android; then
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=dlopen,--wrap=dlclose,--wrap=dlerror,--wrap=dlsym,--wrap=dladdr,--wrap=getaddrinfo,--wrap=freeaddrinfo,--wrap=gai_strerror"
fi
@ -9093,11 +9093,11 @@ ac_configure_args="$ac_configure_args --prefix=$dist"
ac_configure_args="$ac_configure_args --with-sync-build-files=$_topsrcdir"
if test "$MOZ_MEMORY"; then
ac_configure_args="$ac_configure_args --enable-jemalloc"
if test -n "$MOZ_UTILS_LDFLAGS"; then
export MOZ_UTILS_LDFLAGS
if test -n "$MOZ_GLUE_LDFLAGS"; then
export MOZ_GLUE_LDFLAGS
fi
if test -n "$MOZ_UTILS_PROGRAM_LDFLAGS"; then
export MOZ_UTILS_PROGRAM_LDFLAGS
if test -n "$MOZ_GLUE_PROGRAM_LDFLAGS"; then
export MOZ_GLUE_PROGRAM_LDFLAGS
fi
fi
export MOZ_APP_NAME

View File

@ -78,9 +78,9 @@ endif
endif
ifeq (Darwin,$(OS_TARGET))
# On OSX, with jemalloc enabled, having sqlite linked against mozutils
# On OSX, with jemalloc enabled, having sqlite linked against mozglue
# causes crashes in NSS standalone tools.
MOZ_UTILS_LDFLAGS =
MOZ_GLUE_LDFLAGS =
endif
# XXX Force -O2 optimisation on Mac because using the default -O3 causes

View File

@ -278,7 +278,7 @@ public class GeckoAppShell
// The package data lib directory isn't placed in ld.so's
// search path, so we have to manually load libraries that
// libxul will depend on. Not ideal.
System.loadLibrary("mozutils");
System.loadLibrary("mozglue");
GeckoApp geckoApp = GeckoApp.mAppContext;
String homeDir;
if (Build.VERSION.SDK_INT < 8 ||

View File

@ -49,7 +49,7 @@ main(int argc, char* argv[])
if (argc < 2)
return 1;
void *mozloader_handle = dlopen("libmozutils.so", RTLD_LAZY);
void *mozloader_handle = dlopen("libmozglue.so", RTLD_LAZY);
if (!mozloader_handle) {
__android_log_print(ANDROID_LOG_ERROR, "GeckoChildLoad",
"Couldn't load mozloader because %s", dlerror());

View File

@ -313,8 +313,8 @@ MOZ_BROWSE_INFO = @MOZ_BROWSE_INFO@
MOZ_TOOLS_DIR = @MOZ_TOOLS_DIR@
MOZ_QUANTIFY = @MOZ_QUANTIFY@
MSMANIFEST_TOOL = @MSMANIFEST_TOOL@
MOZ_UTILS_LDFLAGS = @MOZ_UTILS_LDFLAGS@
MOZ_UTILS_PROGRAM_LDFLAGS = @MOZ_UTILS_PROGRAM_LDFLAGS@
MOZ_GLUE_LDFLAGS = @MOZ_GLUE_LDFLAGS@
MOZ_GLUE_PROGRAM_LDFLAGS = @MOZ_GLUE_PROGRAM_LDFLAGS@
# Codesighs tools option, enables win32 mapfiles.
MOZ_MAPINFO = @MOZ_MAPINFO@

View File

@ -243,13 +243,13 @@ endif # MOZ_DEBUG
# the Makefile wants static CRT linking.
ifeq ($(MOZ_MEMORY)_$(USE_STATIC_LIBS),1_1)
# Disable default CRT libs and add the right lib path for the linker
MOZ_UTILS_LDFLAGS=
MOZ_GLUE_LDFLAGS=
endif
endif # WINNT && !GNU_CC
ifndef MOZ_UTILS_PROGRAM_LDFLAGS
MOZ_UTILS_PROGRAM_LDFLAGS=$(MOZ_UTILS_LDFLAGS)
ifndef MOZ_GLUE_PROGRAM_LDFLAGS
MOZ_GLUE_PROGRAM_LDFLAGS=$(MOZ_GLUE_LDFLAGS)
endif
#

View File

@ -792,7 +792,7 @@ endif
# Create dependencies on static (and shared EXTRA_DSO_LIBS) libraries
DO_EXPAND_LIBS = $(foreach f,$(1),$(if $(filter %.$(LIB_SUFFIX),$(f)),$(if $(wildcard $(f).$(LIBS_DESC_SUFFIX)),$(f).$(LIBS_DESC_SUFFIX),$(if $(wildcard $(f)),$(f)))))
LIBS_DEPS = $(call DO_EXPAND_LIBS,$(filter %.$(LIB_SUFFIX),$(LIBS) $(if $(PROGRAM)$(SIMPLE_PROGRAMS),$(MOZ_UTILS_PROGRAM_LDFLAGS))))
LIBS_DEPS = $(call DO_EXPAND_LIBS,$(filter %.$(LIB_SUFFIX),$(LIBS) $(if $(PROGRAM)$(SIMPLE_PROGRAMS),$(MOZ_GLUE_PROGRAM_LDFLAGS))))
SHARED_LIBRARY_LIBS_DEPS = $(call DO_EXPAND_LIBS,$(SHARED_LIBRARY_LIBS))
HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX),$(HOST_LIBS))
DSO_LDOPTS_DEPS = $(call DO_EXPAND_LIBS,$(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS)))
@ -893,7 +893,7 @@ alltags:
$(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) $(EXE_DEF_FILE) $(RESFILE) $(GLOBAL_DEPS)
@$(RM) $@.manifest
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
$(EXPAND_LD) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
$(EXPAND_LD) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
ifdef MSMANIFEST_TOOL
@if test -f $@.manifest; then \
if test -f "$(srcdir)/$@.manifest"; then \
@ -915,10 +915,10 @@ ifdef MOZ_PROFILE_GENERATE
endif
else # !WINNT || GNU_CC
ifeq ($(CPP_PROG_LINK),1)
$(EXPAND_CCC) -o $@ $(CXXFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
$(EXPAND_CCC) -o $@ $(CXXFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
@$(call CHECK_STDCXX,$@)
else # ! CPP_PROG_LINK
$(EXPAND_CC) -o $@ $(CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
$(EXPAND_CC) -o $@ $(CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
endif # CPP_PROG_LINK
endif # WINNT && !GNU_CC
@ -964,7 +964,7 @@ endif
#
$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
$(EXPAND_LD) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
$(EXPAND_LD) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
ifdef MSMANIFEST_TOOL
@if test -f $@.manifest; then \
mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
@ -973,10 +973,10 @@ ifdef MSMANIFEST_TOOL
endif # MSVC with manifest tool
else
ifeq ($(CPP_PROG_LINK),1)
$(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
$(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
@$(call CHECK_STDCXX,$@)
else
$(EXPAND_CC) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
$(EXPAND_CC) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
endif # CPP_PROG_LINK
endif # WINNT && !GNU_CC
@ -1089,10 +1089,10 @@ ifdef DTRACE_LIB_DEPENDENT
ifndef XP_MACOSX
dtrace -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(shell $(EXPAND_LIBS) $(MOZILLA_PROBE_LIBS))
endif
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(DTRACE_PROBE_OBJ) $(MOZILLA_PROBE_LIBS) $(RESFILE) $(LDFLAGS) $(MOZ_UTILS_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(DTRACE_PROBE_OBJ) $(MOZILLA_PROBE_LIBS) $(RESFILE) $(LDFLAGS) $(MOZ_GLUE_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
@$(RM) $(DTRACE_PROBE_OBJ)
else # ! DTRACE_LIB_DEPENDENT
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(MOZ_UTILS_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(MOZ_GLUE_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
endif # DTRACE_LIB_DEPENDENT
@$(call CHECK_STDCXX,$@)

View File

@ -4293,7 +4293,7 @@ if test "$MOZ_MEMORY"; then
;;
*-mingw*)
AC_DEFINE(MOZ_MEMORY_WINDOWS)
# the interesting bits will get passed down in MOZ_UTILS_LDFLAGS
# the interesting bits will get passed down in MOZ_GLUE_LDFLAGS
;;
*)
AC_MSG_ERROR([--enable-jemalloc not supported on ${target}])
@ -4308,8 +4308,8 @@ if test "$MOZ_MEMORY"; then
fi
fi
AC_SUBST(MOZ_MEMORY)
AC_SUBST(MOZ_UTILS_LDFLAGS)
AC_SUBST(MOZ_UTILS_PROGRAM_LDFLAGS)
AC_SUBST(MOZ_GLUE_LDFLAGS)
AC_SUBST(MOZ_GLUE_PROGRAM_LDFLAGS)
dnl ========================================================
dnl = Use malloc wrapper lib

View File

@ -1412,7 +1412,7 @@ abstract public class GeckoApp
enableStrictMode();
}
System.loadLibrary("mozutils");
System.loadLibrary("mozglue");
mMainHandler = new Handler();
Log.w(LOGTAG, "zerdatime " + new Date().getTime() + " - onCreate");
if (savedInstanceState != null) {

View File

@ -47,7 +47,7 @@
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozutils@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@
#ifdef XP_MACOSX
@BINPATH@/XUL
#else
@ -84,7 +84,6 @@
@BINPATH@/resources.arsc
@BINPATH@/package-name.txt
@BINPATH@/classes.dex
@BINPATH@/@DLL_PREFIX@mozutils@DLL_SUFFIX@
@BINPATH@/res/drawable
@BINPATH@/res/drawable-hdpi
@BINPATH@/res/layout

View File

@ -6,25 +6,26 @@ extensions/feedback@mobile.mozilla.org.xpi
#endif
#ifdef XP_WIN
#if _MSC_VER != 1400
@BINPATH@/Microsoft.VC80.CRT.manifest
@BINPATH@/msvcm80.dll
@BINPATH@/msvcp80.dll
@BINPATH@/msvcr80.dll
Microsoft.VC80.CRT.manifest
msvcm80.dll
msvcp80.dll
msvcr80.dll
#endif
#if _MSC_VER != 1500
@BINPATH@/Microsoft.VC90.CRT.manifest
@BINPATH@/msvcm90.dll
@BINPATH@/msvcp90.dll
@BINPATH@/msvcr90.dll
Microsoft.VC90.CRT.manifest
msvcm90.dll
msvcp90.dll
msvcr90.dll
#endif
#if _MSC_VER != 1600
@BINPATH@/msvcp100.dll
@BINPATH@/msvcr100.dll
msvcp100.dll
msvcr100.dll
#endif
#if _MSC_VER != 1700
@BINPATH@/msvcp110.dll
@BINPATH@/msvcr110.dll
msvcp110.dll
msvcr110.dll
#endif
mozcrt19.dll
mozcpp19.dll
#endif
@DLL_PREFIX@mozutils@DLL_SUFFIX@

View File

@ -47,7 +47,7 @@
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozutils@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@
#ifdef XP_MACOSX
@BINPATH@/XUL
#else
@ -85,7 +85,6 @@
@BINPATH@/resources.arsc
@BINPATH@/package-name.txt
@BINPATH@/classes.dex
@BINPATH@/@DLL_PREFIX@mozutils@DLL_SUFFIX@
@BINPATH@/res/drawable
@BINPATH@/res/drawable-hdpi
@BINPATH@/res/layout

View File

@ -6,25 +6,26 @@ extensions/feedback@mobile.mozilla.org.xpi
#endif
#ifdef XP_WIN
#if _MSC_VER != 1400
@BINPATH@/Microsoft.VC80.CRT.manifest
@BINPATH@/msvcm80.dll
@BINPATH@/msvcp80.dll
@BINPATH@/msvcr80.dll
Microsoft.VC80.CRT.manifest
msvcm80.dll
msvcp80.dll
msvcr80.dll
#endif
#if _MSC_VER != 1500
@BINPATH@/Microsoft.VC90.CRT.manifest
@BINPATH@/msvcm90.dll
@BINPATH@/msvcp90.dll
@BINPATH@/msvcr90.dll
Microsoft.VC90.CRT.manifest
msvcm90.dll
msvcp90.dll
msvcr90.dll
#endif
#if _MSC_VER != 1600
@BINPATH@/msvcp100.dll
@BINPATH@/msvcr100.dll
msvcp100.dll
msvcr100.dll
#endif
#if _MSC_VER != 1700
@BINPATH@/msvcp110.dll
@BINPATH@/msvcr110.dll
msvcp110.dll
msvcr110.dll
#endif
mozcrt19.dll
mozcpp19.dll
#endif
@DLL_PREFIX@mozutils@DLL_SUFFIX@

View File

@ -11,14 +11,15 @@
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Mozilla platform.
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# the Mozilla Foundation <http://www.mozilla.org/>.
# Portions created by the Initial Developer are Copyright (C) 2009
# Mozilla Foundation.
# Portions created by the Initial Developer are Copyright (C) 2011
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mike Hommey <mh@glandium.org>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@ -34,20 +35,13 @@
#
# ***** END LICENSE BLOCK *****
DEPTH = ..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
DEPTH = ..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS =
ifdef MOZ_MEMORY
DIRS += jemalloc
endif
DIRS += mozutils
DIRS += mozalloc
DIRS = build
include $(topsrcdir)/config/rules.mk

View File

@ -43,38 +43,38 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = mozutils
LIBRARY_NAME = mozutils
MODULE = mozglue
LIBRARY_NAME = mozglue
DIST_INSTALL = 1
ifdef MOZ_MEMORY
SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,jemalloc,../jemalloc)
SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/jemalloc)
else
# Temporary, until bug 662814 lands
VISIBILITY_FLAGS =
CPPSRCS = dummy.cpp
endif
# Build mozutils as a shared lib on Windows, OSX and Android.
# Build mozglue as a shared lib on Windows, OSX and Android.
ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET)))
FORCE_SHARED_LIB = 1
else
FORCE_STATIC_LIB = 1
endif
MOZ_UTILS_LDFLAGS = # Don't link against ourselves
MOZ_GLUE_LDFLAGS = # Don't link against ourselves
ifeq (WINNT,$(OS_TARGET))
DEFFILE = mozutils.def
DEFFILE = mozglue.def
mozutils.def: mozutils.def.in
mozglue.def: mozglue.def.in
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(ACDEFINES) $< > $@
GARBAGE += mozutils.def
GARBAGE += mozglue.def
LDFLAGS += -ENTRY:DllMain
ifneq (,$(filter -DEFAULTLIB:mozcrt,$(MOZ_UTILS_LDFLAGS)))
ifneq (,$(filter -DEFAULTLIB:mozcrt,$(MOZ_GLUE_LDFLAGS)))
# Don't install the import library if we use mozcrt
NO_INSTALL_IMPORT_LIBRARY = 1
endif

View File

@ -33,7 +33,7 @@
;
; ***** END LICENSE BLOCK *****
LIBRARY mozutils.dll
LIBRARY mozglue.dll
EXPORTS
#ifdef MOZ_MEMORY

View File

@ -191,7 +191,7 @@ static void insert_soinfo_into_debug_map(soinfo * info)
map->l_name = (char*) info->name;
map->l_ld = (uintptr_t)info->dynamic;
/* Stick the new library before libmozutils.so
/* Stick the new library before libmozglue.so
*/
if (!_r_debug)
return;
@ -2449,7 +2449,7 @@ void simple_linker_init(void)
* load before that */
struct link_map *map = debug->r_map;
while (map) {
if (strcmp(map->l_name, "libmozutils.so"))
if (strcmp(map->l_name, "libmozglue.so"))
r_debug_insert = map;
map = map->l_next;
}

View File

@ -55,9 +55,9 @@ ifneq ($(OS_TARGET),Android)
PROGRAM = crashreporter$(BIN_SUFFIX)
DIST_PROGRAM = crashreporter$(BIN_SUFFIX)
# Don't link the updater against libmozutils.
MOZ_UTILS_LDFLAGS =
MOZ_UTILS_PROGRAM_LDFLAGS =
# Don't link the updater against libmozglue.
MOZ_GLUE_LDFLAGS =
MOZ_GLUE_PROGRAM_LDFLAGS =
endif
LOCAL_INCLUDES = -I$(srcdir)/../google-breakpad/src

View File

@ -86,7 +86,7 @@ SDK = $(SDK_PATH)$(PKG_BASENAME).sdk$(SDK_SUFFIX)
ifndef LIBXUL_SDK
JSSHELL_BINS = \
$(DIST)/bin/js$(BIN_SUFFIX) \
$(DIST)/bin/mozutils$(DLL_SUFFIX) \
$(DIST)/bin/mozglue$(DLL_SUFFIX) \
$(NULL)
ifndef MOZ_NATIVE_NSPR
JSSHELL_BINS += $(DIST)/bin/$(LIB_PREFIX)nspr4$(DLL_SUFFIX)
@ -335,7 +335,7 @@ INNER_MAKE_PACKAGE = \
cp $(GECKO_APP_AP_PATH)/gecko.ap_ $(_ABS_DIST) && \
( cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && \
mkdir -p lib/$(ABI_DIR) && \
mv libmozutils.so $(MOZ_CHILD_PROCESS_NAME) lib/$(ABI_DIR) && \
mv libmozglue.so $(MOZ_CHILD_PROCESS_NAME) lib/$(ABI_DIR) && \
rm -f lib.id && \
for SOMELIB in *.so ; \
do \
@ -354,7 +354,7 @@ INNER_UNMAKE_PACKAGE = \
mkdir $(MOZ_PKG_DIR) && \
cd $(MOZ_PKG_DIR) && \
$(UNZIP) $(UNPACKAGE) && \
mv lib/$(ABI_DIR)/libmozutils.so . && \
mv lib/$(ABI_DIR)/libmozglue.so . && \
mv lib/$(ABI_DIR)/*plugin-container* $(MOZ_CHILD_PROCESS_NAME) && \
rm -rf lib/$(ABI_DIR)
endif

View File

@ -51,9 +51,9 @@ CPPSRCS = \
PROGRAM = updater$(BIN_SUFFIX)
# Don't link the updater against libmozutils. See bug 687139
MOZ_UTILS_LDFLAGS =
MOZ_UTILS_PROGRAM_LDFLAGS =
# Don't link the updater against libmozglue. See bug 687139
MOZ_GLUE_LDFLAGS =
MOZ_GLUE_PROGRAM_LDFLAGS =
LOCAL_INCLUDES += -I$(srcdir)/../../readstrings