Skip to content

Commit ac56f03

Browse files
Merge pull request #35640 from aschwaighofer/fix_asan_build
Try to fix the ASAN build
2 parents f1a8fff + 0cd0a36 commit ac56f03

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

unittests/runtime/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
# We can't currently build the runtime tests under ASAN
2+
# The problem is that we want to use the just-build compiler (just like the
3+
# runtime) but ASAN will complain if we link against libgtest and LLVMSupport
4+
# libraries because they were compiled with the host compiler.
15
if(("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "${SWIFT_PRIMARY_VARIANT_SDK}") AND
2-
("${SWIFT_HOST_VARIANT_ARCH}" STREQUAL "${SWIFT_PRIMARY_VARIANT_ARCH}"))
6+
("${SWIFT_HOST_VARIANT_ARCH}" STREQUAL "${SWIFT_PRIMARY_VARIANT_ARCH}") AND
7+
(NOT (LLVM_USE_SANITIZER STREQUAL "Address")))
38

49
if("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
510
if(NOT SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER)

0 commit comments

Comments
 (0)