[clang] [compiler-rt] [llvm] [TySan] Make TySan compatible with UBSan (PR #169036)

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 1 10:43:56 PST 2025


nico wrote:

Hello, before this change, this used to succeed:

```
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS='clang;compiler-rt' -DCOMPILER_RT_SANITIZERS_TO_BUILD='asan;dfsan;msan;hwasan;tsan;cfi' ../llvm-project/llvm
```

Now it fails with

```
 CMake Error at CMakeLists.txt:349 (add_dependencies):
   The dependency target "tysan" of target "runtimes-test-depends" does not
   exist.
 
 
 CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2138 (add_dependencies):
   The dependency target "tysan" of target "check-runtimes" does not exist.
 Call Stack (most recent call first):
   /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2179 (add_lit_target)
   CMakeLists.txt:353 (umbrella_lit_testsuite_end)
 
 
 CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/CMakeLists.txt:117 (add_dependencies):
   The dependency target "tysan" of target "compiler-rt-test-depends" does not
   exist.
 
 
 CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2138 (add_dependencies):
   The dependency target "tysan" of target "check-compiler-rt" does not exist.
 Call Stack (most recent call first):
   /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2179 (add_lit_target)
   /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/CMakeLists.txt:119 (umbrella_lit_testsuite_end)
 
 
 CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2138 (add_dependencies):
   The dependency target "tysan" of target "check-ubsan" does not exist.
 Call Stack (most recent call first):
   /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/cmake/modules/AddLLVM.cmake:2205 (add_lit_target)
   /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/ubsan/CMakeLists.txt:138 (add_lit_testsuite)
```

I attempted to fix this in b73385dda5caa21570ddc6d7277c22aca8f2de1e, please verify.

(Arguably, other runtimes lack similar checks too, but we're not currently disabling those.)

https://github.com/llvm/llvm-project/pull/169036


More information about the cfe-commits mailing list