mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 13:53:11 +00:00
Add configure test for alloc_size attribute.
This commit is contained in:
11
configure.ac
11
configure.ac
@@ -428,6 +428,17 @@ if test "x${je_cv_tls_model}" = "xyes" ; then
|
||||
else
|
||||
AC_DEFINE([JEMALLOC_TLS_MODEL], [ ])
|
||||
fi
|
||||
dnl Check for alloc_size attribute support.
|
||||
SAVED_CFLAGS="${CFLAGS}"
|
||||
JE_CFLAGS_APPEND([-Werror])
|
||||
JE_COMPILABLE([alloc_size attribute], [],
|
||||
[#include <stdlib.h>
|
||||
static void *foo(size_t size) __attribute__((alloc_size(1)));],
|
||||
[je_cv_alloc_size])
|
||||
CFLAGS="${SAVED_CFLAGS}"
|
||||
if test "x${je_cv_alloc_size}" = "xyes" ; then
|
||||
AC_DEFINE([JEMALLOC_HAVE_ATTR_ALLOC_SIZE], [ ])
|
||||
fi
|
||||
|
||||
dnl Support optional additions to rpath.
|
||||
AC_ARG_WITH([rpath],
|
||||
|
||||
Reference in New Issue
Block a user