Bug 1080341 - Remove --enable-wrap-malloc/--with-wrap-malloc. r=mshal

With bug 1077366, --enable-wrap-malloc is not abused anymore for android
linkage. Other than android linkage, the option has been of limited
usefulness since bug 804303 (replace-malloc), which allows runtime wrapping.

In fact, chances are --enable-wrap-malloc breaks things with jemalloc
integration.

This doesn't, however, remove those options from standalone js builds,
although it's not clear they're any useful there either.
This commit is contained in:
Mike Hommey 2014-10-14 07:17:29 +09:00
parent b08088c7c1
commit 7198a50710

View File

@ -7249,39 +7249,6 @@ if test "$OS_TARGET" = Android; then
fi
fi
dnl ========================================================
dnl = Use malloc wrapper lib
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(wrap-malloc,
[ --enable-wrap-malloc Wrap malloc calls (gnu linker only)],
_WRAP_MALLOC=1,
_WRAP_MALLOC= )
if test -n "$_WRAP_MALLOC"; then
if test -n "$GNU_CC"; then
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=malloc,--wrap=calloc,--wrap=valloc,--wrap=free,--wrap=realloc,--wrap=memalign"
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=__builtin_new,--wrap=__builtin_vec_new,--wrap=__builtin_delete,--wrap=__builtin_vec_delete"
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=strdup,--wrap=strndup"
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=vasprintf,--wrap=asprintf"
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=posix_memalign,--wrap=malloc_usable_size"
dnl Wrap operator new and operator delete on Android.
if test "$OS_TARGET" = "Android"; then
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=_Znwj,--wrap=_Znaj,--wrap=_ZdlPv,--wrap=_ZdaPv"
dnl Wrap the nothrow variants too.
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=_ZnwjRKSt9nothrow_t,--wrap=_ZnajRKSt9nothrow_t,--wrap=_ZdlPvRKSt9nothrow_t,--wrap=_ZdaPvRKSt9nothrow_t"
fi
else
AC_MSG_ERROR([--enable-wrap-malloc is not supported for non-GNU toolchains])
fi
fi
dnl ========================================================
dnl = Location of malloc wrapper lib
dnl ========================================================
MOZ_ARG_WITH_STRING(wrap-malloc,
[ --with-wrap-malloc=DIR Location of malloc wrapper library],
WRAP_LDFLAGS="${WRAP_LDFLAGS} $withval")
dnl ========================================================
dnl = Use JS Call tracing
dnl ========================================================
@ -9130,9 +9097,6 @@ if test -z "$MOZ_NATIVE_JEMALLOC" -a "$MOZ_MEMORY" && test -n "$MOZ_JEMALLOC3" -
fi
if test -n "$MANGLE"; then
MANGLED=
if test -n "$_WRAP_MALLOC" -a -z "$JEMALLOC_WRAPPER"; then
JEMALLOC_WRAPPER=__wrap_
fi
for mangle in ${MANGLE}; do
if test -n "$MANGLED"; then
MANGLED="$mangle:$JEMALLOC_WRAPPER$mangle,$MANGLED"
@ -9226,11 +9190,6 @@ if test "$COMPILE_ENVIRONMENT" -a -z "$LIBXUL_SDK_DIR"; then
export WRAP_LDFLAGS
if test -n "$_WRAP_MALLOC"; then
# Avoid doubling wrap malloc arguments
_SUBDIR_CONFIG_ARGS="`echo $_SUBDIR_CONFIG_ARGS | sed -e 's/--enable-wrap-malloc *//'`"
fi
if test -n "$MOZ_USING_CCACHE"; then
# Avoid double prepending ccache by omitting --with-ccache in building NSPR.
_SUBDIR_CONFIG_ARGS="`echo $_SUBDIR_CONFIG_ARGS | sed -e 's/--with-ccache[[^ ]]*//'`"