[英]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.