summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2018-06-21 15:37:25 +0200
committerLuboš Luňák <l.lunak@collabora.com>2018-07-04 15:35:53 +0200
commit0654030f98355f105ddc741147fc0ff03ab0d906 (patch)
tree70bb45dc8896b7ed33ef5effc0765b9810a0bb6d /configure.ac
parent44137151dfd719ed921aece504eb11c5e098492c (diff)
add --enable-split-debug for -gsplit-dwarf
https://lists.freedesktop.org/archives/libreoffice/2018-June/080437.html Change-Id: I2a02e23e46d7a54083249408f09fba87932b1d44 Reviewed-on: https://gerrit.libreoffice.org/56416 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c8d18b18fde8..12516d80219b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1116,6 +1116,11 @@ libo_FUZZ_ARG_ENABLE(debug,
[Include debugging information, disable compiler optimization and inlining plus
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).]))
+
libo_FUZZ_ARG_ENABLE(sal-log,
AS_HELP_STRING([--enable-sal-log],
[Make SAL_INFO and SAL_WARN calls do something even in a non-debug build.]))
@@ -3864,6 +3869,23 @@ else
fi
AC_SUBST(ENABLE_DEBUG)
+if test "$enable_split_debug" = yes; then
+ HAVE_GSPLIT_DWARF=
+ if test "$GCC" = "yes"; then
+ AC_MSG_CHECKING([whether $CC supports -gsplit-dwarf])
+ save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -Werror -gsplit-dwarf"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_SPLIT_DWARF=TRUE ],[])
+ CFLAGS=$save_CFLAGS
+ if test "$HAVE_GCC_SPLIT_DWARF" = "TRUE"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+ AC_SUBST(HAVE_GCC_SPLIT_DWARF)
+fi
+
if test "$enable_sal_log" = yes; then
ENABLE_SAL_LOG=TRUE
fi