diff options
author | Ulf Hermann <[email protected]> | 2025-03-06 14:05:38 +0100 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2025-03-07 09:00:11 +0100 |
commit | 7fae1cbb3cfbb31060d0de5d5b25c91e45c38626 (patch) | |
tree | 2710ded621e3668d770ce9af9238c53cd69b6b18 | |
parent | b350041bb72eb84c2af32fc84cdeeaf1259a30b0 (diff) |
Use git tree hash rather than commit hash as QML_COMPILE_HASH
You can have multiple commit hashes for the same contents. We've seen
that already with the .tag files. We don't want the AOT-compiled
artifacts to be rejected if those are mixed when building host and
target versions of Qt.
Pick-to: 6.9 6.8 6.5
Fixes: QTBUG-134442
Change-Id: Idba4aa4786ae5d638efd1324315a1a5c21ed070c
Reviewed-by: Olivier De Cannière <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Alexandru Croitor <[email protected]>
-rw-r--r-- | cmake/QtDeclarativeSetup.cmake | 8 | ||||
-rw-r--r-- | tests/auto/qml/qqmlcomponent/BLACKLIST | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/cmake/QtDeclarativeSetup.cmake b/cmake/QtDeclarativeSetup.cmake index 165a71e09a..b174756343 100644 --- a/cmake/QtDeclarativeSetup.cmake +++ b/cmake/QtDeclarativeSetup.cmake @@ -3,9 +3,9 @@ # Create a header containing a hash that describes this library. For a # released version of Qt, we'll use the .tag file that is updated by git -# archive with the tree hash. For unreleased versions, we'll ask git -# rev-parse. If none of this works, we use CMake to hash all the files -# in the src/qml/ directory. +# archive with the tree hash. For unreleased versions, we'll do +# "git show -s --format=format:%T" to get the tree hash. If none of this +# works, we use CMake to hash all the files in the src/qml/ directory. # Skip recreation of the hash when doing a developer build. function(qt_declarative_write_tag_header target_name) set(out_file "${CMAKE_CURRENT_BINARY_DIR}/qml_compile_hash_p.h") @@ -27,7 +27,7 @@ function(qt_declarative_write_tag_header target_name) set(QML_COMPILE_HASH "${tag_contents}") elseif(git_path AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../../.git") execute_process( - COMMAND ${git_path} rev-parse HEAD + COMMAND ${git_path} show -s --format=format:%T HEAD OUTPUT_VARIABLE QML_COMPILE_HASH OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") diff --git a/tests/auto/qml/qqmlcomponent/BLACKLIST b/tests/auto/qml/qqmlcomponent/BLACKLIST deleted file mode 100644 index aaf084d6f3..0000000000 --- a/tests/auto/qml/qqmlcomponent/BLACKLIST +++ /dev/null @@ -1,3 +0,0 @@ -# QTBUG-134442 -[loadFromQrc] -qnx |