diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2018-12-19 11:15:40 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2019-02-04 11:06:29 +0100 |
commit | aec51c7f99d6ad0028eebda0213a632b090f6fcf (patch) | |
tree | e8bbd2cb83f1c8c1ab4691790eb750a27092a91f /configure.ac | |
parent | bf63a95b981a9055e5c462cc85732629ce6b98b8 (diff) |
make --enable-split-debug the default for debug builds, if available
Currently done only on Linux, as I'm unsure about the status on other platforms,
and it seems that on Darwin the test passes successfully but later there are
problems. Feel free to add your platform.
https://lists.freedesktop.org/archives/libreoffice/2018-June/080437.html
https://lists.freedesktop.org/archives/libreoffice/2018-July/080484.html
Change-Id: I232ead45a1aff15cc738c612750ac28aedc08e83
Reviewed-on: https://gerrit.libreoffice.org/65425
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index 45e4595ef08b..fff0cab68623 100644 --- a/configure.ac +++ b/configure.ac @@ -554,6 +554,7 @@ test_dbus=yes test_fontconfig=yes test_cairo=no test_gdb_index=no +test_split_debug=no # Default values, as such probably valid just for Linux, set # differently below just for Mac OSX, but at least better than @@ -607,6 +608,7 @@ linux-gnu*|k*bsd*-gnu*) test_kde5=yes test_gtk3_kde5=yes test_gdb_index=yes + test_split_debug=yes if test "$enable_fuzzers" != yes; then test_freetype=yes test_fontconfig=yes @@ -1130,9 +1132,9 @@ libo_FUZZ_ARG_ENABLE(debug, extra debugging code like assertions. Extra large build! (enables -g compiler flag).])) libo_FUZZ_ARG_ENABLE(split-debug, - AS_HELP_STRING([--enable-split-debug], - [Uses split debug information (-gsplit-dwarf compile flag). Saves disk space and build time, - but requires tools that support it (both build tools and debuggers).])) + AS_HELP_STRING([--disable-split-debug], + [Disable using split debug information (-gsplit-dwarf compile flag). Split debug information + saves disk space and build time, but requires tools that support it (both build tools and debuggers).])) libo_FUZZ_ARG_ENABLE(gdb-index, AS_HELP_STRING([--disable-gdb-index], @@ -3867,9 +3869,10 @@ else fi AC_SUBST(ENABLE_DEBUG) -if test "$enable_split_debug" = yes; then - HAVE_GSPLIT_DWARF= - if test "$GCC" = "yes"; then +HAVE_GSPLIT_DWARF= +if test "$enable_split_debug" != no; then + dnl Currently by default enabled only on Linux, feel free to set test_split_debug above also for other platforms. + if test "$enable_split_debug" = yes -o \( "$test_split_debug" = "yes" -a -n "$ENABLE_DEBUG$ENABLE_DBGUTIL" \); then AC_MSG_CHECKING([whether $CC supports -gsplit-dwarf]) save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -Werror -gsplit-dwarf" @@ -3878,11 +3881,19 @@ if test "$enable_split_debug" = yes; then if test "$HAVE_GCC_SPLIT_DWARF" = "TRUE"; then AC_MSG_RESULT([yes]) else - AC_MSG_RESULT([no]) + if test "$enable_split_debug" = yes; then + AC_MSG_ERROR([no]) + else + AC_MSG_RESULT([no]) + fi fi fi - AC_SUBST(HAVE_GCC_SPLIT_DWARF) + if test -z "$HAVE_GCC_SPLIT_DWARF" -a "$test_split_debug" = "yes" -a -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then + AC_MSG_WARN([Compiler is not capable of creating split debug info, linking will require more time and disk space.]) + add_warning "Compiler is not capable of creating split debug info, linking will require more time and disk space." + fi fi +AC_SUBST(HAVE_GCC_SPLIT_DWARF) ENABLE_GDB_INDEX= if test "$enable_gdb_index" != "no"; then |