summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@centrum.cz>2021-09-20 10:31:40 +0000
committerLuboš Luňák <l.lunak@collabora.com>2021-09-20 22:50:59 +0200
commitc7c9f3f57a2feae5d3bc3c47104786883ed09e44 (patch)
treeafd53d5339e7266b1f3399094354566c64f34b0d /configure.ac
parent36f76223193fb96df7b8cbc1a1ff30f739857189 (diff)
use clang-cl's -Zc:dllexportInlines- for clang-cl builds
This is clang-cl's equivalent of -fvisibility-inlines-hidden, and it seems to be also sort of the equivalent of MSVC's -Zc:inline. So it saves build time and disk space. Clang docs say that this is binary compatible in only one direction, so our public C++ code shouldn't be using this, as external C++ code could try to use exported inlines that are no longer there. Change-Id: Ie6217808f8ee4a15344183abfc65038e1558d1b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122352 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index fde9600bab27..e592f6da8ce5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7599,6 +7599,21 @@ if test "$GCC" = yes && test "$COM_IS_CLANG" != TRUE; then
fi
AC_SUBST([HAVE_BROKEN_GCC_WSTRINGOP_OVERFLOW])
+HAVE_DLLEXPORTINLINES=
+if test "$_os" = "WINNT"; then
+ AC_MSG_CHECKING([whether $CXX_BASE supports -Zc:dllexportInlines-])
+ AC_LANG_PUSH([C++])
+ save_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS -Werror -Zc:dllexportInlines-"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE()], [
+ HAVE_DLLEXPORTINLINES=TRUE
+ AC_MSG_RESULT([yes])
+ ], [AC_MSG_RESULT([no])])
+ CXXFLAGS=$save_CXXFLAGS
+ AC_LANG_POP([C++])
+fi
+AC_SUBST([HAVE_DLLEXPORTINLINES])
+
dnl ===================================================================
dnl CPU Intrinsics support - SSE, AVX
dnl ===================================================================