diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-02-18 10:20:38 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-02-19 10:27:43 +0100 |
commit | e957382700ed9237d4a7b374cd76bec466f5231c (patch) | |
tree | 71f94d798edd8fa64707caf41a2c8066d4ca95d9 /solenv | |
parent | e62b9937ed33388055560ca0710990742b530aec (diff) |
add --enable-optimized=debug
This will use -Og with GCC/Clang instead of -O0, which should make
unittests run faster without (hopefully) breaking anything related
to debugging. This is primarily meant to Jenkins builds, where
debug info is rarely needed (backtraces for unittest crashes AFAICT).
This can be also used to make LO itself run faster when developing,
but I personally do not find it worth it (with Clang and full PCH
this makes starmath build take about 70% longer, although presumably
for non-PCH builds the relative increase will be smaller).
Change-Id: I198d0759ebca94c90be662e02e0f1281a24d1d70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88917
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/LinkTarget.mk | 6 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_MSC_defs.mk | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index 914c36d35cd2..9e14f599b690 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -44,7 +44,11 @@ gb_LinkTarget__symbols_enabled = \ $(filter $(1),$(ENABLE_SYMBOLS_FOR)))) # debug flags, if the LinkTarget is named in the list of libraries of ENABLE_SYMBOLS_FOR -gb_LinkTarget__get_debugflags=$(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(call gb_LinkTarget__symbols_enabled,$(1)),$(gb_DEBUGINFO_FLAGS)) +gb_LinkTarget__get_debugflags= \ +$(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS), \ +$(if $(ENABLE_OPTIMIZED_DEBUG),$(gb_COMPILERDEBUGOPTFLAGS), \ +$(gb_COMPILERNOOPTFLAGS))) \ +$(if $(call gb_LinkTarget__symbols_enabled,$(1)),$(gb_DEBUGINFO_FLAGS)) # similar for LDFLAGS, use linker optimization flags in non-debug case, # but moreover strip debug from libraries for which debuginfo is not wanted diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 530bc16e8da3..cc0eabc292f2 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -201,6 +201,7 @@ gb_PrecompiledHeader_EXCEPTIONFLAGS := $(gb_LinkTarget_EXCEPTIONFLAGS) # optimization level gb_COMPILERNOOPTFLAGS := -O0 -fstrict-aliasing -fstrict-overflow +gb_COMPILERDEBUGOPTFLAGS := -Og ifeq ($(OS),ANDROID) gb_DEBUGINFO_FLAGS=-glldb diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk index 11c1aa6d4b49..7409cffa1f40 100644 --- a/solenv/gbuild/platform/com_MSC_defs.mk +++ b/solenv/gbuild/platform/com_MSC_defs.mk @@ -265,6 +265,7 @@ gb_LINKER_DEBUGINFO_FLAGS := gb_COMPILEROPTFLAGS := -O2 -Oy- gb_COMPILERNOOPTFLAGS := -Od +gb_COMPILERDEBUGOPTFLAGS := ifeq ($(gb_FULLDEPS),$(true)) gb_COMPILERDEPFLAGS := -showIncludes |