[Libreoffice-commits] core.git: vcl/Library_vclplug_kde5.mk vcl/Library_vclplug_qt5.mk

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Dec 21 22:04:47 UTC 2018


 vcl/Library_vclplug_kde5.mk |    8 ++++++++
 vcl/Library_vclplug_qt5.mk  |    8 ++++++++
 2 files changed, 16 insertions(+)

New commits:
commit dad7c2213979695cf3573a130309206191b45157
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Thu Dec 20 17:10:37 2018 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Fri Dec 21 23:04:19 2018 +0100

    workaround to make Qt5 code build with Clang+icecream
    
    Qt5 uses QT_HAS_INCLUDE (which maps to __has_include), and uses it
    to guard #include <chrono>. Clang's -frewrite-includes, which icecream
    uses for distributing source to remote nodes, for some reason doesn't
    recognize __has_include properly when wrapped by this macro, and this
    all results in strange compile errors related to std::chrono.
    
    Change-Id: Ia375ebd928b40ebd51ab4cc59488f3b62939e039
    Reviewed-on: https://gerrit.libreoffice.org/65506
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/vcl/Library_vclplug_kde5.mk b/vcl/Library_vclplug_kde5.mk
index 4d134d0fbf8b..2d2a8a920a1c 100644
--- a/vcl/Library_vclplug_kde5.mk
+++ b/vcl/Library_vclplug_kde5.mk
@@ -94,4 +94,12 @@ $(eval $(call gb_Library_add_libs,vclplug_kde5,\
 ))
 endif
 
+# Workaround for clang+icecream (clang's -frewrite-includes
+# doesn't handle Qt5's QT_HAS_INCLUDE that Qt5 uses for <chrono>).
+ifeq ($(COM_IS_CLANG),TRUE)
+$(eval $(call gb_Library_add_defs,vclplug_qt5, \
+    -include chrono \
+))
+endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/vcl/Library_vclplug_qt5.mk b/vcl/Library_vclplug_qt5.mk
index d51175756009..f7fbfd1cdbdb 100644
--- a/vcl/Library_vclplug_qt5.mk
+++ b/vcl/Library_vclplug_qt5.mk
@@ -118,4 +118,12 @@ $(eval $(call gb_Library_add_libs,vclplug_qt5,\
 ))
 endif
 
+# Workaround for clang+icecream (clang's -frewrite-includes
+# doesn't handle Qt5's QT_HAS_INCLUDE that Qt5 uses for <chrono>).
+ifeq ($(COM_IS_CLANG),TRUE)
+$(eval $(call gb_Library_add_defs,vclplug_qt5, \
+    -include chrono \
+))
+endif
+
 # vim: set noet sw=4 ts=4:


More information about the Libreoffice-commits mailing list