One more try to resurrect build hash

This commit is contained in:
alesapin 2022-03-30 23:27:46 +02:00
parent 02574bd05b
commit 10db099d2f

View File

@ -261,8 +261,8 @@ endif ()
# Add a section with the hash of the compiled machine code for integrity checks. # 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). # Only for official builds, because adding a section can be time consuming (rewrite of several GB).
# And cross compiled binaries are not supported (since you cannot execute clickhouse hash-binary) # And cross compiled binaries are not supported (since you cannot execute clickhouse hash-binary)
if (OBJCOPY_PATH AND CLICKHOUSE_OFFICIAL_BUILD AND (NOT CMAKE_TOOLCHAIN_FILE)) if (OBJCOPY_PATH AND CLICKHOUSE_OFFICIAL_BUILD AND (NOT CMAKE_TOOLCHAIN_FILE OR CMAKE_TOOLCHAIN_FILE MATCHES "linux/toolchain-x86_64.cmake$"))
set (USE_BINARY_HASH 1) set (USE_BINARY_HASH 1 CACHE STRING "Calculate binary hash and store it in the separate section")
endif () endif ()
# Allows to build stripped binary in a separate directory # Allows to build stripped binary in a separate directory