[compiler-rt] Reapply [compiler-rt] Check for and use -lunwind when linking with -nodefaultlibs (PR #66584)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 16 13:02:52 PDT 2023
mstorsjo wrote:
Previously this failed with the following error:
```
-- Looking for _Unwind_RaiseException in unwind
-- Looking for _Unwind_RaiseException in unwind - not found
CMake Error at /usr/share/cmake-3.25/Modules/CheckLibraryExists.cmake:71 (try_compile):
Only libraries may be used as try_compile or try_run IMPORTED
LINK_LIBRARIES. Got unwind of type UTILITY.
Call Stack (most recent call first):
/b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/compiler-rt/cmake/config-ix.cmake:66 (check_library_exists)
/b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/compiler-rt/CMakeLists.txt:281 (include)
```
I tried fixing it by wrapping it all in an `if (NOT TARGET unwind)` - which works, but feels rather ugly...
https://github.com/llvm/llvm-project/pull/66584
More information about the llvm-commits
mailing list