mirror of
https://github.com/matrix-construct/construct
synced 2024-11-15 14:31:11 +01:00
configure: Add some better clang-specific options for --enable-profile; output.
This commit is contained in:
parent
6124bf612c
commit
df29c95dad
1 changed files with 16 additions and 4 deletions
20
configure.ac
20
configure.ac
|
@ -348,14 +348,25 @@ dnl
|
||||||
AC_MSG_CHECKING(whether to do a profile build)
|
AC_MSG_CHECKING(whether to do a profile build)
|
||||||
AC_ARG_ENABLE(profile, AC_HELP_STRING([--enable-profile], [Enable profiling]),
|
AC_ARG_ENABLE(profile, AC_HELP_STRING([--enable-profile], [Enable profiling]),
|
||||||
[
|
[
|
||||||
if test "$ac_cv_c_compiler_gnu" = yes; then
|
profiling="yes"
|
||||||
|
AM_COND_IF(GCC,
|
||||||
|
[
|
||||||
AC_MSG_RESULT([yes, adding -pg])
|
AC_MSG_RESULT([yes, adding -pg])
|
||||||
CXXFLAGS+=" -pg"
|
CXXFLAGS+=" -pg"
|
||||||
AC_DEFINE(CHARYBDIS_PROFILE, 1, [Define this if you are profiling.])
|
AC_DEFINE(CHARYBDIS_PROFILE, 1, [Define this if you are profiling.])
|
||||||
else
|
])
|
||||||
AC_MSG_RESULT([no, profile builds only work with gcc])
|
|
||||||
fi
|
AM_COND_IF(CLANG,
|
||||||
|
[
|
||||||
|
AC_MSG_RESULT([yes, adding profiling flags])
|
||||||
|
CXXFLAGS+=" -fprofile-instr-generate"
|
||||||
|
CXXFLAGS+=" -fcoverage-mapping"
|
||||||
|
LDFLAGS+=" -fprofile-instr-generate"
|
||||||
|
AC_DEFINE(CHARYBDIS_PROFILE, 1, [Define this if you are profiling.])
|
||||||
|
])
|
||||||
], [
|
], [
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
profiling="no"
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
|
@ -2174,6 +2185,7 @@ echo "Linker ............................ $LD"
|
||||||
echo "Linker flags (LDFLAGS) ............ $LDFLAGS"
|
echo "Linker flags (LDFLAGS) ............ $LDFLAGS"
|
||||||
echo "Developer debug ................... $debug"
|
echo "Developer debug ................... $debug"
|
||||||
echo "Developer assert .................. $assert ($assert_type)"
|
echo "Developer assert .................. $assert ($assert_type)"
|
||||||
|
echo "Developer profiling ............... $profiling"
|
||||||
echo "Low-memory compile ................ $lowmem_compile"
|
echo "Low-memory compile ................ $lowmem_compile"
|
||||||
echo "Precompiled headers ............... $build_pch"
|
echo "Precompiled headers ............... $build_pch"
|
||||||
echo "Optimized compile ................. $optimize"
|
echo "Optimized compile ................. $optimize"
|
||||||
|
|
Loading…
Reference in a new issue