summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-09-20 01:44:17 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-09-20 22:51:12 +0200
commit47a8a65022e3fd7624c95d0341b4809aad11fddb (patch)
tree9062dc99b3c90ed8df3ad1db9ca20eaa40a3fb33 /cppuhelper
parentc7c9f3f57a2feae5d3bc3c47104786883ed09e44 (diff)
use MSVC's /Zc:inline option to reduce binary size
If I'm getting it right, MSVC has a non-conforming feature that allows to declare a function as inline without defining its body in the header, and it'll work if the function is actually emitted elsewhere, and the linker will sort it out. This seems to be implemented by forcing emitting of out-of-line copies of all inline functions, which is wasteful. /Zc:inline disables this useless feature, which seems to save quite some space (optimized build, starmath's .o files 350k->220k, smlo.dll 2.5M->2.2M). The docs don't say anything about binary compatibility, but treat it the same way as -Zc:dllexportInlines, just in case. This change also may help avoid the tdf#144598 problem for our AVX/etc. code, such as in Calc. Change-Id: I73cc5d46ba1e4245e8d3b6688804c2b9684d2f9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122334 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/Library_cppuhelper.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/cppuhelper/Library_cppuhelper.mk b/cppuhelper/Library_cppuhelper.mk
index 3c87054b45ab..5e131cb6c43e 100644
--- a/cppuhelper/Library_cppuhelper.mk
+++ b/cppuhelper/Library_cppuhelper.mk
@@ -12,6 +12,8 @@ $(eval $(call gb_Library_Library,cppuhelper))
$(eval $(call gb_Library_set_soversion_script,cppuhelper,$(SRCDIR)/cppuhelper/source/gcc3.map))
+$(eval $(call gb_Library_set_precompiled_header,cppuhelper,cppuhelper/inc/pch/precompiled_cppuhelper))
+
$(eval $(call gb_Library_use_internal_comprehensive_api,cppuhelper,\
cppuhelper \
udkapi \
@@ -24,8 +26,6 @@ $(eval $(call gb_Library_add_defs,cppuhelper,\
-DCPPUHELPER_DLLIMPLEMENTATION \
))
-$(eval $(call gb_Library_set_precompiled_header,cppuhelper,cppuhelper/inc/pch/precompiled_cppuhelper))
-
$(eval $(call gb_Library_use_libraries,cppuhelper,\
cppu \
reg \