diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-01-19 20:11:15 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-05-26 10:37:00 +0200 |
commit | 2d1f1a1c849fd4f2c7f1211f8d3f03aec069bd44 (patch) | |
tree | 25bc72516c3cbb536ba21c955e92b658e38ff2c1 /configure.ac | |
parent | 5202771939da66ac85ca3221d69e7e5f5cca8da7 (diff) |
use -Xclang -debug-info-kind=constructor if available
The option, available since Clang10, emits debuginfo for classes
with explicit ctors only together with the ctor, which avoids
redundant debuginfo for such classes, noticeably saving both build
time and disk space. https://reviews.llvm.org/D72427
I've been using this for quite some time, without problems.
Change-Id: I24e5339f983cb8d8990185436dd63e00f0d3ce60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94756
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 8f9e1c71047a..ba2a2d0ea3ee 100644 --- a/configure.ac +++ b/configure.ac @@ -4098,6 +4098,19 @@ if test "$enable_split_debug" != no; then fi AC_SUBST(HAVE_GCC_SPLIT_DWARF) +HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR= +AC_MSG_CHECKING([whether $CC_BASE supports -Xclang -debug-info-kind=constructor]) +save_CFLAGS=$CFLAGS +CFLAGS="$CFLAGS -Werror -Xclang -debug-info-kind=constructor" +AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR=TRUE ],[]) +CFLAGS=$save_CFLAGS +if test "$HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR" = "TRUE"; then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi +AC_SUBST(HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR) + ENABLE_GDB_INDEX= if test "$enable_gdb_index" != "no"; then dnl Currently by default enabled only on Linux, feel free to set test_gdb_index above also for other platforms. |