summaryrefslogtreecommitdiff
path: root/config_host.mk.in
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-06-22 21:17:56 +0200
committerLuboš Luňák <l.lunak@collabora.com>2020-01-18 14:56:37 +0100
commita0323937ff4b36594e26b5c1a143af188c75abfc (patch)
treec72205ba55e37fe8bdc934b52097dd8074cbac13 /config_host.mk.in
parent68c934c08401d1edbd89746dd0d554d7fc80665b (diff)
support Clang's -fmodules-codegen/debuginfo options for PCH building
These (starting with my patches for Clang-to-be-10) allowing emitting debuginfo and functions into a dedicated object file, so that all the normal compilations using the PCH can skip those, thus saving the time. The debuginfo option seems to always be worth it. The codegen option is more tricky, it doesn't seem to be worth it for optimized builds (optimizing all the functions in that one object file costs too much). This requires also using --Wl,--gc-sections . The reason is that the object file contains all template instances instantiated from the PCH, so that they can be shared, but the template instance may come from another library or use a private symbol from that library. For example the std::unique_ptr<ScInterpreterContext> in ScInterpreterContextPool in the header refers to ScInterpreterContext dtor. But even though both these classes are private, the header gets used also by scfilt, because there it is included by document.hxx because of a private ScDocument data member. So even though nothing in scfilt uses ScInterpreterContext, the PCH object file will refer to it. Fortunately that template instance itself is not used by scfilt, so --gc-sections will remove it. Change-Id: I2a06ebcc4dd4175424b3a72ab3ebcaf2ac3ee295 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87011 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'config_host.mk.in')
-rw-r--r--config_host.mk.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/config_host.mk.in b/config_host.mk.in
index e1cddb295964..2c5eec97a156 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -448,6 +448,8 @@ export PATH=@LO_PATH@
export LIBO_PATH_SEPARATOR=@P_SEP@
export PAGEMAKER_CFLAGS=$(gb_SPACE)@PAGEMAKER_CFLAGS@
export PAGEMAKER_LIBS=$(gb_SPACE)@PAGEMAKER_LIBS@
+export PCH_MODULES_CODEGEN=@PCH_MODULES_CODEGEN@
+export PCH_MODULES_DEBUGINFO=@PCH_MODULES_DEBUGINFO@
export PERL=@PERL@
export PKGFORMAT=@PKGFORMAT@
export PKGMK=@PKGMK@