summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qhash.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2021-05-01 08:58:45 -0700
committerThiago Macieira <thiago.macieira@intel.com>2021-05-01 11:55:42 -0700
commit26a7c530090e98d7f30d300e06dc87bca02c8a30 (patch)
tree832f5e732796d206993243f24bc345857e6d872d /src/corelib/tools/qhash.cpp
parentc8736e8e614066e46bc267356ee7757e42ed6e5f (diff)
QHash: disable the AES based one on the bootstrap library
The bootstrap library doesn't need it. All bootstrapped tools are expected to produce deterministic output, given the enforced seed of 0: #ifdef QT_BOOTSTRAPPED // the seed is always 0 in bootstrapped mode (no seed generation code), // so help the compiler do dead code elimination seed = 0; #endif Change-Id: I755911ae7d0341f49039fffd167afc934ff1c9e1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/corelib/tools/qhash.cpp')
-rw-r--r--src/corelib/tools/qhash.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index 187839ca08..2221de1461 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -527,7 +527,7 @@ lt16:
}
#endif
-#if defined(__ARM_FEATURE_CRYPTO)
+#if defined(__ARM_FEATURE_CRYPTO) && !defined(QT_BOOTSTRAPPED)
static size_t aeshash(const uchar *p, size_t len, size_t seed) noexcept
{
uint8x16_t key;
@@ -669,7 +669,7 @@ size_t qHashBits(const void *p, size_t size, size_t seed) noexcept
#ifdef AESHASH
if (seed && qCpuHasFeature(AES) && qCpuHasFeature(SSE4_2))
return aeshash(reinterpret_cast<const uchar *>(p), size, seed);
-#elif defined(__ARM_FEATURE_CRYPTO)
+#elif defined(__ARM_FEATURE_CRYPTO) && !defined(QT_BOOTSTRAPPED)
// Do additional runtime check as Yocto hard enables Crypto extension for
// all armv8 configs
if (seed && (qCpuFeatures() & CpuFeatureAES))