[Libreoffice-commits] core.git: config_host.mk.in configure.ac solenv/gbuild
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 26 08:37:40 UTC 2020
config_host.mk.in | 1 +
configure.ac | 13 +++++++++++++
solenv/gbuild/platform/com_GCC_defs.mk | 4 ++++
3 files changed, 18 insertions(+)
New commits:
commit 2d1f1a1c849fd4f2c7f1211f8d3f03aec069bd44
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Sun Jan 19 20:11:15 2020 +0100
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Tue May 26 10:37:00 2020 +0200
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 at collabora.com>
diff --git a/config_host.mk.in b/config_host.mk.in
index bcce45b1ce77..f59b51d8f652 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -271,6 +271,7 @@ export GTK3_LIBS=$(gb_SPACE)@GTK3_LIBS@
export USING_X11=@USING_X11@
export HAMCREST_JAR=@HAMCREST_JAR@
export HAVE_BROKEN_GCC_WMAYBE_UNINITIALIZED=@HAVE_BROKEN_GCC_WMAYBE_UNINITIALIZED@
+export HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR=@HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR@
export HAVE_GCC_AVX=@HAVE_GCC_AVX@
export HAVE_GCC_BUILTIN_ATOMIC=@HAVE_GCC_BUILTIN_ATOMIC@
export HAVE_GCC_FNO_ENFORCE_EH_SPECS=@HAVE_GCC_FNO_ENFORCE_EH_SPECS@
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.
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 4d3602864bc8..1707a7481ee6 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -221,6 +221,10 @@ ifeq ($(HAVE_GCC_SPLIT_DWARF),TRUE)
gb_DEBUGINFO_FLAGS+=-gsplit-dwarf
endif
+ifeq ($(HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR),TRUE)
+gb_DEBUGINFO_FLAGS+=-Xclang -debug-info-kind=constructor
+endif
+
ifeq ($(ENABLE_GDB_INDEX),TRUE)
gb_LINKER_DEBUGINFO_FLAGS += -Wl,--gdb-index
gb_DEBUGINFO_FLAGS += -ggnu-pubnames
More information about the Libreoffice-commits
mailing list