summaryrefslogtreecommitdiff
path: root/config_host
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-03-04 20:27:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-03-06 08:18:06 +0100
commit47b4ee1a1a2a0212ffcf3e85647e9f9f67276ee3 (patch)
tree4dc94e2ea216efee2b583a9fa4ecd13fe884889d /config_host
parentcedc8a942e451a63dd1e7dae7f25642c0fcb4be8 (diff)
limit symbols exported when using --enable-mergelibs
when doing LTO and --enable-mergelibs, we can improve the effectiveness of LTO by marking more code as internal to the merged library. So introduce a new macro UNLESS_MERGELIBS, which we can wrap around *_DLLPUBLIC annotations Also introduced here is a script that can be run on a completed build to determine which classes can be marked with this macro. Change-Id: I73fb87c897489da53791277d0b66b01f884ba061 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89991 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'config_host')
-rw-r--r--config_host/config_options.h.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/config_host/config_options.h.in b/config_host/config_options.h.in
index 0223f089ce2b..a52aed1f4198 100644
--- a/config_host/config_options.h.in
+++ b/config_host/config_options.h.in
@@ -11,6 +11,17 @@
*/
#define STATIC_LINKING 0
+#define ENABLE_MERGELIBS 0
+
#define ENABLE_RUNTIME_OPTIMIZATIONS 0
+// Used to turn off visibility for some classes/symbols when linking with --enable-mergelibs
+//
+#if ENABLE_MERGELIBS
+#define UNLESS_MERGELIBS(x)
+#else
+#define UNLESS_MERGELIBS(x) x
+#endif
+
+
#endif