diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2022-10-25 11:09:31 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2022-10-25 18:33:14 -0700 |
commit | 11cc74b0661bdad122857e0405cced57d9a6bad7 (patch) | |
tree | 0dc595f1ced63f21d1e503ace44b21235ec2db05 /src/corelib/global | |
parent | c2445aeadb4ee49667d75ae0ed7162fd9fb3aec4 (diff) |
Bootstrap: fix MinGW build with -maes
In bootstrap mode, we don't build qsimd.cpp and don't check for CPU
features, but specifying -maes in the compiler command-line can still
enable the AES hash support in qhash.cpp. This has probably been broken
since Qt 6.4 with commit 4be85491e069081cbc9dc29202a25d0771b61f06.
qhash.cpp:(.rdata$.refptr.qt_cpu_features[.refptr.qt_cpu_features]+0x0): undefined reference to `qt_cpu_features'
Pick-to: 6.4
Change-Id: I07ec23f3cb174fb197c3fffd17216241cfd1ab19
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qsimd_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/global/qsimd_p.h b/src/corelib/global/qsimd_p.h index 344aeefc71..1d12902a0a 100644 --- a/src/corelib/global/qsimd_p.h +++ b/src/corelib/global/qsimd_p.h @@ -363,12 +363,16 @@ Q_CORE_EXPORT uint64_t QT_MANGLE_NAMESPACE(qDetectCpuFeatures)(); static inline uint64_t qCpuFeatures() { +#ifdef QT_BOOTSTRAPPED + return qCompilerCpuFeatures; // no detection +#else quint64 features = atomic_load_explicit(QT_MANGLE_NAMESPACE(qt_cpu_features), memory_order_relaxed); if (!QT_SUPPORTS_INIT_PRIORITY) { if (Q_UNLIKELY(features == 0)) features = QT_MANGLE_NAMESPACE(qDetectCpuFeatures)(); } return features; +#endif } #define qCpuHasFeature(feature) (((qCompilerCpuFeatures & CpuFeature ## feature) == CpuFeature ## feature) \ |