From 7c78398fecc2ddf5e26d93411dee75406e25cede Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Tue, 10 Jun 2025 13:19:37 -0700 Subject: [PATCH 1/2] [TySan][CMake] Depend on tysan for check-tysan in runtimes build The runtimes build expects libclang_rt.tysan.a to be available, but the check-tysan target does not actually depend on it when built using a runtimes build with LLVM_ENABLE_RUNTIMES pointing at ./llvm. This means we get test failures when running check-compiler-rt due to the missing static archive. This patch also makes check-tysan depend on tysan when we are using the runtimes build. --- compiler-rt/test/tysan/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler-rt/test/tysan/CMakeLists.txt b/compiler-rt/test/tysan/CMakeLists.txt index 76f57501e854e..6f1beef65ee46 100644 --- a/compiler-rt/test/tysan/CMakeLists.txt +++ b/compiler-rt/test/tysan/CMakeLists.txt @@ -21,7 +21,7 @@ foreach(arch ${TYSAN_TEST_ARCH}) endforeach() set(TYSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS}) -if(NOT COMPILER_RT_STANDALONE_BUILD) +if(NOT COMPILER_RT_STANDALONE_BUILD OR LLVM_RUNTIMES_BUILD) list(APPEND TYSAN_TEST_DEPS tysan) endif() From a4c94dc4f0654489eabc64ca8bd5a7e5a0d8ab77 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Tue, 10 Jun 2025 15:44:49 -0700 Subject: [PATCH 2/2] feedback --- compiler-rt/test/tysan/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler-rt/test/tysan/CMakeLists.txt b/compiler-rt/test/tysan/CMakeLists.txt index 6f1beef65ee46..ce0afa8769f03 100644 --- a/compiler-rt/test/tysan/CMakeLists.txt +++ b/compiler-rt/test/tysan/CMakeLists.txt @@ -21,9 +21,7 @@ foreach(arch ${TYSAN_TEST_ARCH}) endforeach() set(TYSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS}) -if(NOT COMPILER_RT_STANDALONE_BUILD OR LLVM_RUNTIMES_BUILD) - list(APPEND TYSAN_TEST_DEPS tysan) -endif() +list(APPEND TYSAN_TEST_DEPS tysan) add_lit_testsuite(check-tysan "Running the TypeSanitizer tests" ${TYSAN_TESTSUITES}