qt6/kf6: Drop obsolete workaround for clang + icecream

QT_HAS_INCLUDE no longer exists in current Qt 6, making
the workaround obsolete, see upstream qtbase commit [1]
(included in Qt >= 6.5):

    commit 71f35d6057eb65a217ebb8d2bfad365da27e537e
    Author: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
    Date:   Mon Nov 21 15:30:03 2022 +0100

        Remove QT_HAS_FOO() wrapper macros for __has_foo()

        Using wrappers for these macros is problematic when for example passing
        the -frewrite-includes flag to preprocess sources before shipping off to
        distcc or Icecream. It will also start producing warnings when compilers
        implement http://eel.is/c++draft/cpp.cond#7.sentence-2. See for example
        https://reviews.llvm.org/D49091

        Now that all uses of the macros are gone, we can follow up
        c3bd5ffdc8a3b459f18ba6e35fca93e29f3b0ab0 and remove the wrappers.

        Change-Id: I764aea17dcdabd420097a7f4bc0b987a53a345eb
        Reviewed-by: Marc Mutz <marc.mutz@qt.io>

Drop the workaround, which also fixes this build error
with clang-cl on Windows when experimenting with WIP
change [2] to support the qt6 VCL plugin on Windows:

    [build CXX] vcl/qt6/QtAccessibleInterimChildWidget.cxx
    clang-cl: warning: unknown argument ignored in clang-cl: '-include' [-Wunknown-argument]
    clang-cl: error: cannot specify '-FoC:/Users/mwegh/development/git/libreoffice-WORKTREE/workdir/CxxObject/vcl/qt6/QtAccessibleInterimChildWidget.o' when compiling multiple source files
    clang-cl: warning: chrono: 'linker' input unused [-Wunused-command-line-argument]
    make[1]: *** [C:/Users/mwegh/development/git/libreoffice-WORKTREE/solenv/gbuild/LinkTarget.mk:338: C:/Users/mwegh/development/git/libreoffice-WORKTREE/workdir/CxxObject/vcl/qt6/QtAccessibleInterimChildWidget.o] Error 1

[1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=71f35d6057eb65a217ebb8d2bfad365da27e537e
[2] https://gerrit.libreoffice.org/c/core/+/199615

Change-Id: I8696c25a75f597ee014fcb7374f0106635a34615
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202282
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn
2026-03-22 09:00:50 +01:00
parent 9886139db4
commit 63fc6f1247
2 changed files with 0 additions and 17 deletions
-9
View File
@@ -74,13 +74,4 @@ $(eval $(call gb_Library_add_libs,vclplug_kf6,\
))
endif
# Workaround for clang+icecream (clang's -frewrite-includes
# doesn't handle Qt5's QT_HAS_INCLUDE that Qt5 uses for <chrono>),
# and probably the same is true for Qt6.
ifeq ($(COM_IS_CLANG),TRUE)
$(eval $(call gb_Library_add_cxxflags,vclplug_kf6, \
-include chrono \
))
endif
# vim: set noet sw=4 ts=4:
-8
View File
@@ -178,12 +178,4 @@ $(eval $(call gb_Library_add_libs,vclplug_qt6,\
))
endif
# Workaround for clang+icecream (clang's -frewrite-includes
# doesn't handle Qt6's QT_HAS_INCLUDE that Qt6 uses for <chrono>).
ifeq ($(COM_IS_CLANG),TRUE)
$(eval $(call gb_Library_add_cxxflags,vclplug_qt6, \
-include chrono \
))
endif
# vim: set noet sw=4 ts=4: