Do not run integrity check for cross compiled binaries

Follow-up for: #18811
Refs: #18785
This commit is contained in:
Azat Khuzhin 2021-01-08 15:22:34 +03:00
parent 6dba945a2e
commit ed26ccf217

View File

@ -222,7 +222,8 @@ endif ()
# Add a section with the hash of the compiled machine code for integrity checks.
# Only for official builds, because adding a section can be time consuming (rewrite of several GB).
if (OBJCOPY_PATH AND YANDEX_OFFICIAL_BUILD)
# And cross compiled binaries are not supported (since you cannot execute clickhouse hash-binary)
if (OBJCOPY_PATH AND YANDEX_OFFICIAL_BUILD AND (NOT CMAKE_TOOLCHAIN_FILE))
set (USE_BINARY_HASH 1)
endif ()