diff options
author | Cristian Adam <cristian.adam@qt.io> | 2021-06-03 12:42:07 +0200 |
---|---|---|
committer | Cristian Adam <cristian.adam@qt.io> | 2021-06-04 16:25:17 +0200 |
commit | 20b3eb0fd8b5f82cf432f2c06e7c5d3f533df0a5 (patch) | |
tree | 21c7cee74b5636ae48e63450d9198aff8f1b2812 /src/corelib | |
parent | 6d82d0c53272ec51465fec3dee71db02cf147a94 (diff) |
CMake: Add support for building with clang-cl
qmake had support for building with clang-cl as the win32-clang-msvc mkspec.
Task-number: QTBUG-89642
Task-number: QTBUG-88081
Change-Id: I0709c289f90fedb121620d1e67ef841602219816
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/CMakeLists.txt | 20 | ||||
-rw-r--r-- | src/corelib/global/qt_pch.h | 35 |
2 files changed, 40 insertions, 15 deletions
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index 2c991f76e0..9f0c95e9d6 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -271,6 +271,26 @@ qt_internal_add_module(Core # special case end ) +if (MSVC AND CLANG) + foreach(subarch sse4_1 rdrnd rdseed) + if (TEST_subarch_${subarch}) + qt_internal_add_simd_part(Core SIMD ${subarch} + SOURCES + global/qsimd.cpp + ) + endif() + endforeach() + + foreach(subarch sse4_1 aesni) + if (TEST_subarch_${subarch}) + qt_internal_add_simd_part(Core SIMD ${subarch} + SOURCES + tools/qhash.cpp + ) + endif() + endforeach() +endif() + qt_update_ignore_pch_source(Core kernel/qmetatype.cpp ) # special case begin diff --git a/src/corelib/global/qt_pch.h b/src/corelib/global/qt_pch.h index 58697517b5..6108b075f0 100644 --- a/src/corelib/global/qt_pch.h +++ b/src/corelib/global/qt_pch.h @@ -62,19 +62,24 @@ # define _POSIX_ # include <limits.h> # undef _POSIX_ -#endif -#include <qcoreapplication.h> -#include <qcoreevent.h> -#include <qiodevice.h> -#include <qlist.h> -#include <qvariant.h> /* All moc genereated code has this include */ -#include <qobject.h> -#if QT_CONFIG(regularexpression) -# include <qregularexpression.h> -#endif -#include <qscopedpointer.h> -#include <qshareddata.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtimer.h> +# if defined(Q_CC_CLANG) && defined(Q_CC_MSVC) +// See https://bugs.llvm.org/show_bug.cgi?id=41226 +# include <wchar.h> +__declspec(selectany) auto *__wmemchr_symbol_loader_value = wmemchr(L"", L'0', 0); +# endif +# endif +# include <qcoreapplication.h> +# include <qcoreevent.h> +# include <qiodevice.h> +# include <qlist.h> +# include <qvariant.h> /* All moc genereated code has this include */ +# include <qobject.h> +# if QT_CONFIG(regularexpression) +# include <qregularexpression.h> +# endif +# include <qscopedpointer.h> +# include <qshareddata.h> +# include <qstring.h> +# include <qstringlist.h> +# include <qtimer.h> #endif |