mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-26 00:53:34 +03:00
Avoid -lgcc for heap profiling if unwind.h is missing.
This removes an unneeded library dependency when falling back to intrinsics-based backtracing (or failing to enable heap profiling at all).
This commit is contained in:
parent
54269dc0ed
commit
664ef652d9
1 changed files with 3 additions and 1 deletions
|
|
@ -1082,7 +1082,9 @@ fi
|
||||||
if test "x$backtrace_method" = "x" -a "x$enable_prof_libgcc" = "x1" \
|
if test "x$backtrace_method" = "x" -a "x$enable_prof_libgcc" = "x1" \
|
||||||
-a "x$GCC" = "xyes" ; then
|
-a "x$GCC" = "xyes" ; then
|
||||||
AC_CHECK_HEADERS([unwind.h], , [enable_prof_libgcc="0"])
|
AC_CHECK_HEADERS([unwind.h], , [enable_prof_libgcc="0"])
|
||||||
AC_CHECK_LIB([gcc], [_Unwind_Backtrace], [JE_APPEND_VS(LIBS, -lgcc)], [enable_prof_libgcc="0"])
|
if test "x${enable_prof_libgcc}" = "x1" ; then
|
||||||
|
AC_CHECK_LIB([gcc], [_Unwind_Backtrace], [JE_APPEND_VS(LIBS, -lgcc)], [enable_prof_libgcc="0"])
|
||||||
|
fi
|
||||||
if test "x${enable_prof_libgcc}" = "x1" ; then
|
if test "x${enable_prof_libgcc}" = "x1" ; then
|
||||||
backtrace_method="libgcc"
|
backtrace_method="libgcc"
|
||||||
AC_DEFINE([JEMALLOC_PROF_LIBGCC], [ ])
|
AC_DEFINE([JEMALLOC_PROF_LIBGCC], [ ])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue