diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2022-02-10 12:09:59 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-02-13 22:10:50 +0000 |
commit | 22a7259d2ed791a1382c59727afeba04cf72e2e5 (patch) | |
tree | b6c311f0366552bc53424b8b3f10da041463bf52 | |
parent | f6833f23c1e5f424a8c4b6a49f3d4ef504c33bd2 (diff) |
Avoid spurious dependency on qml_compile_hash_p.h
The compile hash changes on every commit, so including it in a central
header like qv4compileddata_p.h would cause many spurious rebuilds.
As we only needed it there for a static assert, we can simply move that
check into a source file.
Change-Id: I9f24cb3faf5172023b0ece9e6aa07db02638c8be
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 28b32ae449913d079f220110ffa90de9a9ee9784)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/qml/common/qv4compileddata_p.h | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4executablecompilationunit.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/common/qv4compileddata_p.h b/src/qml/common/qv4compileddata_p.h index c0bcbeb96c..9530d391d6 100644 --- a/src/qml/common/qv4compileddata_p.h +++ b/src/qml/common/qv4compileddata_p.h @@ -67,7 +67,6 @@ #include <private/qendian_p.h> #include <private/qv4staticvalue_p.h> -#include <private/qml_compile_hash_p.h> #include <functional> #include <limits.h> @@ -945,7 +944,6 @@ struct QmlUnit static_assert(sizeof(QmlUnit) == 16, "QmlUnit structure needs to have the expected size to be binary compatible on disk when generated by host compiler and loaded by target"); enum { QmlCompileHashSpace = 48 }; -static_assert(QmlCompileHashSpace > QML_COMPILE_HASH_LENGTH); static const char magic_str[] = "qv4cdata"; struct Unit diff --git a/src/qml/jsruntime/qv4executablecompilationunit.cpp b/src/qml/jsruntime/qv4executablecompilationunit.cpp index b897e7ddb4..68e2787cc0 100644 --- a/src/qml/jsruntime/qv4executablecompilationunit.cpp +++ b/src/qml/jsruntime/qv4executablecompilationunit.cpp @@ -69,6 +69,8 @@ #include <QtCore/qcryptographichash.h> #include <QtCore/QScopedValueRollback> +static_assert(QV4::CompiledData::QmlCompileHashSpace > QML_COMPILE_HASH_LENGTH); + #if defined(QML_COMPILE_HASH) && defined(QML_COMPILE_HASH_LENGTH) && QML_COMPILE_HASH_LENGTH > 0 # ifdef Q_OS_LINUX // Place on a separate section on Linux so it's easier to check from outside |