When in-tree libcxx is selected as the sanitizer C++ ABI, use libcxx
targets rather than libcxxabi and libunwind, since those may not be
available on all platforms (Windows for example).
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| compiler-rt/CMakeLists.txt | ||
|---|---|---|
| 582–585 | I don't think so, the use of libcxxabi and libunwind instead of libcxx is for legacy reasons that are no longer relevant. Using libcxx targets when you set SANITIZER_CXX_ABI_LIBNAME=libc++ shouldn't be surprising, adding the comment about libcxxabi and libunwind here would just add confusion. | |
| 583–587 | This TODO is still relevant, although it's primarily useful to me as a future reminder when I start refactoring this code further. | |
This caused our builds to break:
CMake Error at /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/cmake/Modules/AddCompilerRT.cmake:383 (target_link_libraries):
Error evaluating generator expression:
$<TARGET_LINKER_FILE:$<IF:$<TARGET_EXISTS:libcxx-abi-shared>,libcxx-abi-shared,libcxx-abi-static>>
No target "libcxx-abi-static"
Call Stack (most recent call first):
/b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/ubsan/CMakeLists.txt:242 (add_compiler_rt_runtime)see https://bugs.chromium.org/p/chromium/issues/detail?id=1370500#c1 for a reproducer.
I've reverted in 20a269cf774e774fb5c7194b1aebe24df27a233f until this is figured out.
Should we document this directly here?