Kaydet (Commit) 494bdd3d authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Support for tcmalloc and jemalloc is long dead

When it was originally added to --with-alloc (tcmalloc:
f63ffaf3,
54efc5ed,
0abd71b4
708b6d42 "INTEGRATION: CWS configure14: #i59160#
allow usage of tcmalloc and system-malloc"; jemalloc:
826a90d6 "configure25: #i111045# jemalloc"), the
old build system's solenv/inc/unxlng*.mk added corresponding -l switches to
linker command lines, but it appears that was never carried over into the new
build system.

And even if the AC_CHECL_LIB calls in configure.ac prior to
e612f026 "Ensure AC_CHECK_LIB/AC_SEARCH_LIBS do
not poison LIBS" would have extended LIBS with the correpsonding -l switches,
there appears to be no mechanism in the new build system that would have
depended on letting that have any effect on which alloc lib to link against.

So the only remaining effect of --with-alloc={tcmalloc,jemalloc} is to set
FORCE_SYSALLOC in Library_sal.mk, same as --with-alloc=system does.  So whoever
still uses the former configure switches should just switch to the latter.

(Also adapt the documentation of --with-alloc to reality, "internal" instead of
"oo".)

Change-Id: Iac0e302c5f9602daf5f8452a0fc1887dc55ee27b
Reviewed-on: https://gerrit.libreoffice.org/47178Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 84466e76
......@@ -2103,8 +2103,7 @@ with_build_version=$withval,
AC_ARG_WITH(alloc,
AS_HELP_STRING([--with-alloc],
[Define which allocator to build with (choices are oo, system, tcmalloc, jemalloc).
Note that on FreeBSD/NetBSD system==jemalloc]),
[Define which allocator to build with (choices are internal, system).]),
,)
AC_ARG_WITH(parallelism,
......@@ -6476,29 +6475,6 @@ if test "$with_alloc" = "system"; then
AC_MSG_RESULT([system])
ALLOC="SYS_ALLOC"
fi
if test "$with_alloc" = "tcmalloc"; then
AC_MSG_RESULT(tcmalloc)
if ! echo $host_cpu | $GREP -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
AC_MSG_ERROR([tcmalloc only available/usable on ix86])
fi
AC_CHECK_LIB([tcmalloc], [malloc], [:],
[AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], [])
ALLOC="TCMALLOC"
fi
if test "$with_alloc" = "jemalloc"; then
if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then
AC_MSG_RESULT(jemalloc)
save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -pthread"
AC_CHECK_LIB([jemalloc], [malloc], [:],
[AC_MSG_ERROR(jemalloc not found or functional. Install the jemalloc allocator.)], [])
ALLOC="JEMALLOC"
CFLAGS=$save_CFLAGS
else
AC_MSG_RESULT([system])
ALLOC="SYS_ALLOC"
fi
fi
if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
AC_MSG_RESULT([internal])
fi
......
......@@ -23,7 +23,7 @@ $(eval $(call gb_Library_add_defs,sal,\
$(if $(filter $(BUILD_TYPE),FUZZERS), \
-DFORCE_DEFAULT_SIGNAL \
) \
$(if $(filter $(ALLOC),SYS_ALLOC TCMALLOC JEMALLOC)$(filter-out X$(ENABLE_RUNTIME_OPTIMIZATIONS),XTRUE), \
$(if $(filter $(ALLOC),SYS_ALLOC)$(filter-out X$(ENABLE_RUNTIME_OPTIMIZATIONS),XTRUE), \
-DFORCE_SYSALLOC \
) \
$(if $(filter $(OS),IOS), \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment