diff options
author | Martin Storsjö <martin@martin.st> | 2017-11-11 16:59:31 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2018-01-18 16:02:07 +0000 |
commit | bfc96c9c0e103c4fcfda25b9a6eaa80f4f19fba1 (patch) | |
tree | f13a76f87bee00d2be525863f4f1b55f32d0fa5b /src/corelib/global/qglobal.h | |
parent | 0ed471419af18794a0fbd038b7a9a18cfb67de8f (diff) |
Only define QT_FASTCALL on x86_32
The __fastcall calling convention is silently ignored on other
architectures. The GNU attribute regparm is allowed but doesn't
make sense on x86_64. On other architectures, the attribute isn't
supported at all.
This fixes building with clang for MinGW/ARM and ARM64.
Change-Id: Ice1c6eadd0e90b2e5e34736542ee49a25dc67fe6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r-- | src/corelib/global/qglobal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 2464db7c5f..b85b008f70 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -472,7 +472,7 @@ using qsizetype = QIntegerForSizeof<std::size_t>::Signed; # define QT_ASCII_CAST_WARN #endif -#if defined(__i386__) || defined(_WIN32) +#ifdef Q_PROCESSOR_X86_32 # if defined(Q_CC_GNU) # define QT_FASTCALL __attribute__((regparm(3))) # elif defined(Q_CC_MSVC) |