summaryrefslogtreecommitdiff
path: root/solenv/gbuild
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-01-19 20:11:15 +0100
committerLuboš Luňák <l.lunak@collabora.com>2020-05-26 10:37:00 +0200
commit2d1f1a1c849fd4f2c7f1211f8d3f03aec069bd44 (patch)
tree25bc72516c3cbb536ba21c955e92b658e38ff2c1 /solenv/gbuild
parent5202771939da66ac85ca3221d69e7e5f5cca8da7 (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 'solenv/gbuild')
-rw-r--r--solenv/gbuild/platform/com_GCC_defs.mk4
1 files changed, 4 insertions, 0 deletions
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