summaryrefslogtreecommitdiff
path: root/libreofficekit/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-03-08 08:34:09 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-03-08 08:37:29 +0100
commit5e79a328645e6bc2ac3cbd7f2d6b9298772c0598 (patch)
tree449a72a7b49833ce65a88b0243dd93fb8d1813c1 /libreofficekit/qa
parentb4fda7b3f9cf928f45baf6846dd70e97cdb9904a (diff)
New LOK_LOADLIB_GLOBAL to let clients control dlopen(RTLD_GLOBAL)
...in LibreOfficeKintInit.h's lok_loadlib, now that RTLD_GLOBAL isn't only needed for UBSan (62b124b2704adf11a63681164d05a8eb49dfb105 "Ensure RTTI symbol visibility for Linux Clang -fsanitize=function,vptr") but also for -stdlib=libc++ on Linux (see <https://whatofhow.wordpress.com/2016/03/01/libclibcabi-on-linux/>). Change-Id: I24ed6612c3d922eba695423d46af5635c77f7077
Diffstat (limited to 'libreofficekit/qa')
-rw-r--r--libreofficekit/qa/unit/tiledrendering.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/libreofficekit/qa/unit/tiledrendering.cxx b/libreofficekit/qa/unit/tiledrendering.cxx
index e28fece0d8cb..1df2eff37f54 100644
--- a/libreofficekit/qa/unit/tiledrendering.cxx
+++ b/libreofficekit/qa/unit/tiledrendering.cxx
@@ -19,8 +19,14 @@
#include <osl/file.hxx>
#include <rtl/bootstrap.hxx>
+#if defined __clang__ && defined __linux__
+#include <cxxabi.h>
#include <config_options.h>
- // see use of ENABLE_RUNTIME_OPTIMIZATIONS in LibreOfficeKintInit.h
+#if defined _LIBCPPABI_VERSION || !ENABLE_RUNTIME_OPTIMIZATIONS
+#define LOK_LOADLIB_GLOBAL
+#endif
+#endif
+
#include <LibreOfficeKit/LibreOfficeKitInit.h>
#include <LibreOfficeKit/LibreOfficeKit.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>