[PATCH] Allow to build without exporting symbols

Mike Hommey mh+jemalloc at glandium.org
Wed Nov 7 22:40:11 PST 2012

From: Mike Hommey <mh at glandium.org>

When statically linking jemalloc, it may be beneficial not to export its
symbols if it makes sense, which allows the compiler and the linker to do
some further optimizations.
 configure.ac |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/configure.ac b/configure.ac
index 1c52439..8558961 100644
--- a/configure.ac
+++ b/configure.ac
@@ -471,6 +471,13 @@ for stem in ${public_syms}; do
   AC_DEFINE_UNQUOTED([${n}], [${m}])
+  [AS_HELP_STRING([--without-export], [disable exporting jemalloc public APIs])],
+  [if test "x$with_export" = "xno"; then
 dnl Do not mangle library-private APIs by default.
   [AS_HELP_STRING([--with-private-namespace=<prefix>], [Prefix to prepend to all library-private APIs])],

More information about the jemalloc-discuss mailing list