[英]Build LLVM 16 (master) fail on libunwind
我正在尝试在 Ubuntu 22.04 上构建 LLVM master。 但是libunwind有错误。
CMake Error at /home/hxf0223/tmp/llvm-project/libunwind/src/CMakeLists.txt:109 (message):
Compiler doesn't support generation of unwind tables if exception support
is disabled. Building libunwind DSO with runtime dependency on C++ ABI
library is not supported.
构建命令是:
CC=clang CXX=clang++ cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;libclc;lld;lldb;mlir;polly;pstl" -DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON -DLIBCXXABI_USE_COMPILER_RT=ON -DLIBCXXABI_USE_LLVM_UNWINDER=ON -DLIBCXX_USE_COMPILER_RT=ON -DLIBUNWIND_USE_COMPILER_RT=ON -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_RUNTIMES=all ../llvm
有没有人在更新大师上建立成功? 谢谢!
来自 libunwind/src/CMakeLists.txt:
if (LIBUNWIND_ENABLE_SHARED AND
NOT (LIBUNWIND_SUPPORTS_FNO_EXCEPTIONS_FLAG AND
LIBUNWIND_SUPPORTS_FUNWIND_TABLES_FLAG))
message(FATAL_ERROR
"Compiler doesn't support generation of unwind tables if exception "
"support is disabled. Building libunwind DSO with runtime dependency "
"on C++ ABI library is not supported.")
endif()
似乎在启用LIBUNWIND_ENABLE_SHARED
时未设置LIBUNWIND_SUPPORTS_FUNWIND_TABLES_FLAG
或LIBUNWIND_SUPPORTS_FNO_EXCEPTIONS_FLAG
之一(或两者,我不是这方面的专家)时会出现错误。
您可以尝试手动设置它们或使用不同的编译器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.