Skip to content

Commit db02b20

Browse files
Merge pull request ClickHouse#92639 from ClickHouse/backport/25.8/sccache-rust-fix
Backport part of ClickHouse#85686
2 parents a197881 + 98841d7 commit db02b20

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

contrib/corrosion-cmake/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,16 @@ if (SANITIZE STREQUAL "memory")
134134
elseif (SANITIZE STREQUAL "thread")
135135
set(RUST_CARGO_BUILD_STD "-Zbuild-std=std,panic_abort,core,alloc")
136136
list(APPEND RUSTFLAGS "-Zsanitizer=thread")
137+
elseif (SANITIZE STREQUAL "address")
138+
set(RUST_CARGO_BUILD_STD "-Zbuild-std=std,panic_abort,core,alloc")
139+
list(APPEND RUSTFLAGS "-Zsanitizer=address")
140+
endif()
141+
142+
# Set metadata flag to force different hashes for different sanitizers
143+
if (SANITIZE STREQUAL "")
144+
list(APPEND RUSTFLAGS "-C" "metadata=no-sanitizer")
145+
else()
146+
list(APPEND RUSTFLAGS "-C" "metadata=with-sanitizer-${SANITIZE}")
137147
endif()
138148

139149
list(APPEND RUSTFLAGS

0 commit comments

Comments
 (0)