diff --git a/src/corelib/global/qlogging_p.h b/src/corelib/global/qlogging_p.h index bc331c80c0d..9122524f8b1 100644 --- a/src/corelib/global/qlogging_p.h +++ b/src/corelib/global/qlogging_p.h @@ -17,7 +17,7 @@ #include #include "qlogging.h" -#include "qloggingcategory.h" +#include #if !defined(QT_BOOTSTRAPPED) && QT_CONFIG(regularexpression) # if __has_include() && QT_CONFIG(backtrace) diff --git a/src/corelib/global/qsimd.cpp b/src/corelib/global/qsimd.cpp index 15755b1ca22..732ce3cf30c 100644 --- a/src/corelib/global/qsimd.cpp +++ b/src/corelib/global/qsimd.cpp @@ -252,7 +252,7 @@ static inline quint64 detectProcessorFeatures() # define X86_BASELINE "no-sse" #endif -#if defined(Q_CC_GNU) +#if defined(Q_CC_GNU) || defined(Q_CC_CLANG) // lower the target for functions in this file # undef QT_FUNCTION_TARGET_BASELINE # define QT_FUNCTION_TARGET_BASELINE __attribute__((target(X86_BASELINE))) diff --git a/src/corelib/global/qsimd_p.h b/src/corelib/global/qsimd_p.h index 233c7a3167a..6723c78ff44 100644 --- a/src/corelib/global/qsimd_p.h +++ b/src/corelib/global/qsimd_p.h @@ -101,7 +101,7 @@ QT_WARNING_DISABLE_INTEL(103) #if defined(Q_PROCESSOR_ARM_64) # define QT_COMPILER_SUPPORTS_HERE(x) ((__ARM_FEATURE_ ## x) || (__ ## x ## __) || QT_COMPILER_SUPPORTS(x)) -# if defined(Q_CC_GNU) +# if defined(Q_CC_GNU) || defined(Q_CC_CLANG) /* GCC requires attributes for a function */ # define QT_FUNCTION_TARGET(x) __attribute__((__target__(QT_FUNCTION_TARGET_STRING_ ## x))) # else @@ -124,12 +124,12 @@ QT_WARNING_DISABLE_INTEL(103) # define QT_COMPILER_SUPPORTS_HERE(x) QT_COMPILER_SUPPORTS(x) # define QT_FUNCTION_TARGET(x) #elif defined(Q_PROCESSOR_X86) -# if defined(Q_CC_CLANG) && defined(Q_CC_MSVC) +# if defined(Q_CC_CLANG) && defined(Q_CC_MSVC) && (Q_CC_CLANG < 1900) # define QT_COMPILER_SUPPORTS_HERE(x) (__ ## x ## __) # else # define QT_COMPILER_SUPPORTS_HERE(x) ((__ ## x ## __) || QT_COMPILER_SUPPORTS(x)) # endif -# if defined(Q_CC_GNU) +# if defined(Q_CC_GNU) || defined(Q_CC_CLANG) /* GCC requires attributes for a function */ # define QT_FUNCTION_TARGET(x) __attribute__((__target__(QT_FUNCTION_TARGET_STRING_ ## x))) # else diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h index 0cbcef27407..bd1ef8dd747 100644 --- a/src/corelib/global/qsystemdetection.h +++ b/src/corelib/global/qsystemdetection.h @@ -242,7 +242,8 @@ #if defined(__SIZEOF_INT128__) // Compiler used in VxWorks SDK declares __SIZEOF_INT128__ but VxWorks doesn't support this type, // so we can't rely solely on compiler here. -#if !defined(Q_OS_VXWORKS) +// MSVC STL used by MSVC and clang-cl does not support int128 +#if !defined(Q_OS_VXWORKS) && !defined(_MSC_VER) # define QT_COMPILER_SUPPORTS_INT128 __SIZEOF_INT128__ #endif #endif // defined(__SIZEOF_INT128__)