Open coolaj86 opened 2 years ago
Note this line:
warning: ignoring superfluous library 'gcc_s': this dependency is fulfilled instead by compiler-rt which zig unconditionally provides
The LLVM compiler-rt runtime (--rtlib=compiler-rt) does not provide an unwinder unless it's compiled with support for it enabled. I'm guessing your LLVM is not, thus the missing symbols:
ld.lld: error: undefined symbol: _Unwind_Resume
The unwind library provides a family of
_Unwind_*
functions implementing the language-neutral stack unwinding portion of the Itanium C++ ABI (Level I). It is a dependency of the C++ ABI library, and sometimes is a dependency of other runtimes.libunwind (LLVM) LLVM’s unwinder library is part of the llvm-project git repository. To build it, pass -DLLVM_ENABLE_RUNTIMES=libunwind to the cmake invocation.
https://clang.llvm.org/docs/Toolchain.html#unwind-library
You may need to rebuild your llvm/clang with this option (and the matching libunwind package downloaded and installed in the correct location, next to llvm itself).
It may also be related to ignoring the request to link with libgcc_s
. From the same page:
libgcc_s (GNU) libgcc_s has an integrated unwinder, and does not need an external unwind library to be provided.
So if libgcc_s had been used, this error would not have happened.