mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 680440 - Clean up jemalloc linkage. r=khuey
This commit is contained in:
parent
411121afb0
commit
1fbab12774
@ -85,8 +85,6 @@ ifdef MOZ_APP_PROFILE
|
||||
DEFINES += -DMOZ_APP_PROFILE="$(MOZ_APP_PROFILE)"
|
||||
endif
|
||||
|
||||
LIBS += $(JEMALLOC_LIBS)
|
||||
|
||||
ifdef LIBXUL_SDK
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
else
|
||||
|
@ -197,7 +197,6 @@ RM = rm -f
|
||||
MOZ_UI_LOCALE = @MOZ_UI_LOCALE@
|
||||
|
||||
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS = @MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS@
|
||||
MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS = @MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS@
|
||||
MOZ_COMPONENT_NSPR_LIBS=@MOZ_COMPONENT_NSPR_LIBS@
|
||||
|
||||
MOZ_FIX_LINK_PATHS=@MOZ_FIX_LINK_PATHS@
|
||||
@ -630,12 +629,11 @@ MOZ_QUANTIFY = @MOZ_QUANTIFY@
|
||||
MSMANIFEST_TOOL = @MSMANIFEST_TOOL@
|
||||
WIN32_REDIST_DIR = @WIN32_REDIST_DIR@
|
||||
MOZ_MEMORY_LDFLAGS = @MOZ_MEMORY_LDFLAGS@
|
||||
MOZ_MEMORY_PROGRAM_LDFLAGS = @MOZ_MEMORY_PROGRAM_LDFLAGS@
|
||||
WIN32_CRT_LIBS = @WIN32_CRT_LIBS@
|
||||
|
||||
# This is for custom CRT building
|
||||
ifdef MOZ_MEMORY
|
||||
# This is used to pass jemalloc flags to NSS
|
||||
DLLFLAGS = @DLLFLAGS@
|
||||
endif
|
||||
|
||||
# Codesighs tools option, enables win32 mapfiles.
|
||||
MOZ_MAPINFO = @MOZ_MAPINFO@
|
||||
|
@ -149,17 +149,6 @@ FINAL_LINK_COMP_NAMES = $(DEPTH)/config/final-link-comp-names
|
||||
MOZ_UNICHARUTIL_LIBS = $(LIBXUL_DIST)/lib/$(LIB_PREFIX)unicharutil_s.$(LIB_SUFFIX)
|
||||
MOZ_WIDGET_SUPPORT_LIBS = $(DIST)/lib/$(LIB_PREFIX)widgetsupport_s.$(LIB_SUFFIX)
|
||||
|
||||
ifdef MOZ_MEMORY
|
||||
ifneq ($(OS_ARCH),WINNT)
|
||||
JEMALLOC_LIBS = $(MKSHLIB_FORCE_ALL) $(call EXPAND_MOZLIBNAME,jemalloc) $(MKSHLIB_UNFORCE_ALL)
|
||||
# If we are linking jemalloc into a program, we want the jemalloc symbols
|
||||
# to be exported
|
||||
ifneq (,$(SIMPLE_PROGRAMS)$(PROGRAM))
|
||||
JEMALLOC_LIBS += $(MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
CC := $(CC_WRAPPER) $(CC)
|
||||
CXX := $(CXX_WRAPPER) $(CXX)
|
||||
MKDIR ?= mkdir
|
||||
@ -247,13 +236,17 @@ endif # MOZ_DEBUG
|
||||
# We don't build a static CRT when building a custom CRT,
|
||||
# it appears to be broken. So don't link to jemalloc if
|
||||
# the Makefile wants static CRT linking.
|
||||
ifeq ($(MOZ_MEMORY)_$(USE_STATIC_LIBS),1_)
|
||||
ifeq ($(MOZ_MEMORY)_$(USE_STATIC_LIBS),1_1)
|
||||
# Disable default CRT libs and add the right lib path for the linker
|
||||
OS_LDFLAGS += $(MOZ_MEMORY_LDFLAGS)
|
||||
MOZ_MEMORY_LDFLAGS=
|
||||
endif
|
||||
|
||||
endif # WINNT && !GNU_CC
|
||||
|
||||
ifndef MOZ_MEMORY_PROGRAM_LDFLAGS
|
||||
MOZ_MEMORY_PROGRAM_LDFLAGS=$(MOZ_MEMORY_LDFLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# Build using PIC by default
|
||||
#
|
||||
|
@ -875,7 +875,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) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
|
||||
$(EXPAND_LD) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_MEMORY_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
|
||||
ifdef MSMANIFEST_TOOL
|
||||
@if test -f $@.manifest; then \
|
||||
if test -f "$(srcdir)/$@.manifest"; then \
|
||||
@ -897,10 +897,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) $(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_MEMORY_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) $(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_MEMORY_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
|
||||
endif # CPP_PROG_LINK
|
||||
endif # WINNT && !GNU_CC
|
||||
|
||||
@ -946,7 +946,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) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
|
||||
$(EXPAND_LD) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_MEMORY_PROGRAM_LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
|
||||
ifdef MSMANIFEST_TOOL
|
||||
@if test -f $@.manifest; then \
|
||||
mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
|
||||
@ -955,10 +955,10 @@ ifdef MSMANIFEST_TOOL
|
||||
endif # MSVC with manifest tool
|
||||
else
|
||||
ifeq ($(CPP_PROG_LINK),1)
|
||||
$(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
|
||||
$(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_MEMORY_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) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
|
||||
$(EXPAND_CC) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_MEMORY_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
|
||||
endif # CPP_PROG_LINK
|
||||
endif # WINNT && !GNU_CC
|
||||
|
||||
@ -1069,10 +1069,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) $(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_MEMORY_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) $(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_MEMORY_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
|
||||
endif # DTRACE_LIB_DEPENDENT
|
||||
@$(call CHECK_STDCXX,$@)
|
||||
|
||||
|
24
configure.in
24
configure.in
@ -2723,7 +2723,6 @@ dnl ========================================================
|
||||
case "$target" in
|
||||
*-linux*|*-kfreebsd*-gnu|*-gnu*)
|
||||
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
|
||||
MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS='-rdynamic -Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/jemalloc-standalone-linkage-version-script'
|
||||
;;
|
||||
*-solaris*)
|
||||
if test -z "$GNU_CC"; then
|
||||
@ -7101,6 +7100,21 @@ if test -z "$MOZ_MEMORY"; then
|
||||
;;
|
||||
esac
|
||||
else
|
||||
if test "${OS_TARGET}" = "Android"; then
|
||||
dnl On Android, we use WRAP_MALLOC to link everything to jemalloc, through mozutils
|
||||
:
|
||||
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 jemalloc
|
||||
MOZ_MEMORY_LDFLAGS='$(call EXPAND_LIBNAME_PATH,jemalloc,$(LIBXUL_DIST)/lib)'
|
||||
else
|
||||
dnl On other Unix systems, we only want to link executables against jemalloc
|
||||
MOZ_MEMORY_PROGRAM_LDFLAGS='$(MKSHLIB_FORCE_ALL) $(call EXPAND_LIBNAME_PATH,jemalloc,$(LIBXUL_DIST)/lib) $(MKSHLIB_UNFORCE_ALL)'
|
||||
if test -n "$GNU_CC"; then
|
||||
dnl And we need jemalloc symbols to be exported.
|
||||
MOZ_MEMORY_PROGRAM_LDFLAGS="$MOZ_MEMORY_PROGRAM_LDFLAGS -rdynamic"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Don't try to run compiler tests on Windows
|
||||
if test "$OS_ARCH" = "WINNT"; then
|
||||
if test -z "$HAVE_64BIT_OS"; then
|
||||
@ -7141,6 +7155,7 @@ else
|
||||
AC_DEFINE(MOZ_MEMORY_LINUX)
|
||||
AC_DEFINE(MOZ_MEMORY_ANDROID)
|
||||
_WRAP_MALLOC=1
|
||||
MOZ_MEMORY_LDFLAGS=
|
||||
;;
|
||||
*-*linux*)
|
||||
AC_DEFINE(MOZ_MEMORY_LINUX)
|
||||
@ -7163,8 +7178,6 @@ else
|
||||
lib -NOLOGO -OUT:crtdll.obj $WIN32_CRT_LIBS -EXTRACT:$WIN32_CRTDLL_FULLPATH
|
||||
if grep -q '__imp__\{0,1\}free' crtdll.obj; then
|
||||
MOZ_MEMORY_LDFLAGS='-LIBPATH:$(DIST)/lib -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt'
|
||||
else
|
||||
MOZ_MEMORY_LDFLAGS='$(DIST)/../memory/jemalloc/jemalloc.lib'
|
||||
fi
|
||||
rm crtdll.obj
|
||||
|
||||
@ -7186,6 +7199,7 @@ else
|
||||
fi # MOZ_MEMORY
|
||||
AC_SUBST(MOZ_MEMORY)
|
||||
AC_SUBST(MOZ_MEMORY_LDFLAGS)
|
||||
AC_SUBST(MOZ_MEMORY_PROGRAM_LDFLAGS)
|
||||
AC_SUBST(WIN32_CRT_LIBS)
|
||||
dnl Need to set this for make because NSS doesn't have configure
|
||||
AC_SUBST(DLLFLAGS)
|
||||
@ -8601,7 +8615,6 @@ AC_SUBST(USE_ELF_DYNSTR_GC)
|
||||
AC_SUBST(USE_ELF_HACK)
|
||||
AC_SUBST(INCREMENTAL_LINKER)
|
||||
AC_SUBST(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS)
|
||||
AC_SUBST(MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS)
|
||||
AC_SUBST(MOZ_COMPONENT_NSPR_LIBS)
|
||||
|
||||
AC_SUBST(MOZ_FIX_LINK_PATHS)
|
||||
@ -9178,6 +9191,9 @@ if test "$MOZ_MEMORY"; then
|
||||
if test -n "$MOZ_MEMORY_LDFLAGS"; then
|
||||
export MOZ_MEMORY_LDFLAGS
|
||||
fi
|
||||
if test -n "$MOZ_MEMORY_PROGRAM_LDFLAGS"; then
|
||||
export MOZ_MEMORY_PROGRAM_LDFLAGS
|
||||
fi
|
||||
fi
|
||||
export MOZ_APP_NAME
|
||||
AC_OUTPUT_SUBDIRS(js/src)
|
||||
|
@ -90,10 +90,6 @@ OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 v
|
||||
OS_LIBS += $(call EXPAND_LIBNAME,usp10 msimg32)
|
||||
endif
|
||||
|
||||
ifneq (Android,$(OS_TARGET))
|
||||
LIBS += $(JEMALLOC_LIBS)
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
|
@ -829,12 +829,6 @@ EXTRA_LIBS += -lposix4 -ldl -lnsl -lsocket
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef MOZ_MEMORY
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
LDFLAGS += -ljemalloc
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef SOLARIS_SUNPRO_CXX
|
||||
ifeq ($(TARGET_CPU),sparc)
|
||||
# Sun Studio SPARC doesn't work well with gcc inline asm, use lock_SunOS_sparc*.il
|
||||
|
@ -320,6 +320,7 @@ MOZ_TOOLS_DIR = @MOZ_TOOLS_DIR@
|
||||
MOZ_QUANTIFY = @MOZ_QUANTIFY@
|
||||
MSMANIFEST_TOOL = @MSMANIFEST_TOOL@
|
||||
MOZ_MEMORY_LDFLAGS = @MOZ_MEMORY_LDFLAGS@
|
||||
MOZ_MEMORY_PROGRAM_LDFLAGS = @MOZ_MEMORY_PROGRAM_LDFLAGS@
|
||||
|
||||
# Codesighs tools option, enables win32 mapfiles.
|
||||
MOZ_MAPINFO = @MOZ_MAPINFO@
|
||||
|
@ -149,17 +149,6 @@ FINAL_LINK_COMP_NAMES = $(DEPTH)/config/final-link-comp-names
|
||||
MOZ_UNICHARUTIL_LIBS = $(LIBXUL_DIST)/lib/$(LIB_PREFIX)unicharutil_s.$(LIB_SUFFIX)
|
||||
MOZ_WIDGET_SUPPORT_LIBS = $(DIST)/lib/$(LIB_PREFIX)widgetsupport_s.$(LIB_SUFFIX)
|
||||
|
||||
ifdef MOZ_MEMORY
|
||||
ifneq ($(OS_ARCH),WINNT)
|
||||
JEMALLOC_LIBS = $(MKSHLIB_FORCE_ALL) $(call EXPAND_MOZLIBNAME,jemalloc) $(MKSHLIB_UNFORCE_ALL)
|
||||
# If we are linking jemalloc into a program, we want the jemalloc symbols
|
||||
# to be exported
|
||||
ifneq (,$(SIMPLE_PROGRAMS)$(PROGRAM))
|
||||
JEMALLOC_LIBS += $(MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
CC := $(CC_WRAPPER) $(CC)
|
||||
CXX := $(CXX_WRAPPER) $(CXX)
|
||||
MKDIR ?= mkdir
|
||||
@ -247,13 +236,17 @@ endif # MOZ_DEBUG
|
||||
# We don't build a static CRT when building a custom CRT,
|
||||
# it appears to be broken. So don't link to jemalloc if
|
||||
# the Makefile wants static CRT linking.
|
||||
ifeq ($(MOZ_MEMORY)_$(USE_STATIC_LIBS),1_)
|
||||
ifeq ($(MOZ_MEMORY)_$(USE_STATIC_LIBS),1_1)
|
||||
# Disable default CRT libs and add the right lib path for the linker
|
||||
OS_LDFLAGS += $(MOZ_MEMORY_LDFLAGS)
|
||||
MOZ_MEMORY_LDFLAGS=
|
||||
endif
|
||||
|
||||
endif # WINNT && !GNU_CC
|
||||
|
||||
ifndef MOZ_MEMORY_PROGRAM_LDFLAGS
|
||||
MOZ_MEMORY_PROGRAM_LDFLAGS=$(MOZ_MEMORY_LDFLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# Build using PIC by default
|
||||
#
|
||||
|
@ -875,7 +875,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) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
|
||||
$(EXPAND_LD) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_MEMORY_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
|
||||
ifdef MSMANIFEST_TOOL
|
||||
@if test -f $@.manifest; then \
|
||||
if test -f "$(srcdir)/$@.manifest"; then \
|
||||
@ -897,10 +897,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) $(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_MEMORY_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) $(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_MEMORY_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
|
||||
endif # CPP_PROG_LINK
|
||||
endif # WINNT && !GNU_CC
|
||||
|
||||
@ -946,7 +946,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) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
|
||||
$(EXPAND_LD) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_MEMORY_PROGRAM_LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
|
||||
ifdef MSMANIFEST_TOOL
|
||||
@if test -f $@.manifest; then \
|
||||
mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
|
||||
@ -955,10 +955,10 @@ ifdef MSMANIFEST_TOOL
|
||||
endif # MSVC with manifest tool
|
||||
else
|
||||
ifeq ($(CPP_PROG_LINK),1)
|
||||
$(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
|
||||
$(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_MEMORY_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) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
|
||||
$(EXPAND_CC) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_MEMORY_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
|
||||
endif # CPP_PROG_LINK
|
||||
endif # WINNT && !GNU_CC
|
||||
|
||||
@ -1069,10 +1069,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) $(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_MEMORY_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) $(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_MEMORY_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
|
||||
endif # DTRACE_LIB_DEPENDENT
|
||||
@$(call CHECK_STDCXX,$@)
|
||||
|
||||
|
@ -4559,6 +4559,7 @@ if test "$MOZ_MEMORY"; then
|
||||
fi
|
||||
AC_SUBST(MOZ_MEMORY)
|
||||
AC_SUBST(MOZ_MEMORY_LDFLAGS)
|
||||
AC_SUBST(MOZ_MEMORY_PROGRAM_LDFLAGS)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Use malloc wrapper lib
|
||||
|
@ -52,17 +52,20 @@ VISIBILITY_FLAGS=
|
||||
CSRCS = jemalloc.c
|
||||
EXPORTS = jemalloc.h jemalloc_types.h
|
||||
LIBRARY_NAME = jemalloc
|
||||
MOZ_MEMORY_LDFLAGS = # Don't link against ourselves
|
||||
|
||||
ifeq (WINNT,$(OS_TARGET))
|
||||
FORCE_SHARED_LIB = 1
|
||||
|
||||
MOZ_MEMORY_LDFLAGS = # Don't link against ourselves
|
||||
|
||||
DEFFILE = $(srcdir)/jemalloc.def
|
||||
|
||||
LDFLAGS += -ENTRY:DllMain
|
||||
|
||||
ifneq (,$(filter -DEFAULTLIB:mozcrt,$(MOZ_MEMORY_LDFLAGS)))
|
||||
# Don't install the import library if we use mozcrt
|
||||
NO_INSTALL_IMPORT_LIBRARY = 1
|
||||
endif
|
||||
|
||||
else # Not Windows
|
||||
|
||||
ifeq ($(OS_ARCH),SunOS)
|
||||
|
@ -54,12 +54,6 @@ LIBRARY_NAME = mozalloc
|
||||
FORCE_SHARED_LIB= 1
|
||||
DIST_INSTALL = 1
|
||||
|
||||
ifdef MOZ_MEMORY
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
EXTRA_DSO_LDOPTS += -L$(DIST)/lib -ljemalloc
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (,$(filter-out OS2,$(OS_ARCH)))
|
||||
# The strndup declaration in string.h is in an ifdef __USE_GNU section
|
||||
DEFINES += -D_GNU_SOURCE
|
||||
|
@ -60,8 +60,6 @@ LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/build
|
||||
DEFINES += -DXPCOM_GLUE
|
||||
STL_FLAGS=
|
||||
|
||||
LIBS += $(JEMALLOC_LIBS)
|
||||
|
||||
LIBS += \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(XPCOM_STANDALONE_GLUE_LDOPTS) \
|
||||
|
@ -79,5 +79,6 @@ SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/jemall
|
||||
endif
|
||||
|
||||
WRAP_LDFLAGS =
|
||||
MOZ_MEMORY_LDFLAGS =
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -45,12 +45,6 @@ LOCAL_INCLUDES += \
|
||||
|
||||
OS_LIBS += $(LIBICONV)
|
||||
|
||||
ifdef MOZ_MEMORY
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
EXTRA_DSO_LDOPTS += -L$(DIST)/lib -ljemalloc
|
||||
endif
|
||||
endif
|
||||
|
||||
DEFINES += \
|
||||
-D_IMPL_NS_COM \
|
||||
-D_IMPL_NS_STRINGAPI \
|
||||
|
@ -111,11 +111,6 @@ include $(topsrcdir)/config/rules.mk
|
||||
|
||||
CFLAGS += $(LIBIDL_CFLAGS)
|
||||
|
||||
# Do not link to jemalloc
|
||||
ifeq ($(OS_ARCH),SunOS)
|
||||
SOLARIS_JEMALLOC_LDFLAGS =
|
||||
endif
|
||||
|
||||
# Compile directly against the static lib, so we can use xpidl during the build
|
||||
# without the shared library path being set.
|
||||
ifneq (,$(filter WINNT OS2,$(OS_ARCH)))
|
||||
|
@ -130,8 +130,6 @@ endif
|
||||
RCFLAGS += -DXULRUNNER_ICO=\"$(DIST)/branding/xulrunner.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\"
|
||||
endif
|
||||
|
||||
LIBS += $(JEMALLOC_LIBS)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
DEFINES += -DXULRUNNER_ICO=\"$(DIST)/branding/xulrunner.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\"
|
||||
|
@ -97,8 +97,6 @@ ifdef _MSC_VER
|
||||
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
|
||||
endif
|
||||
|
||||
LIBS += $(JEMALLOC_LIBS)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
|
Loading…
Reference in New Issue
Block a user