In D61448 the cmake option `LLVM_ENABLE_UNWIND_TABLES` was added.
Despite the name suggesting that the option enables unwind tables, that
patch only uses it to disable them. That makes a difference for
architectures where unwind tables aren't enabled by default. The lack of
unwind tables impacts backtraces and the current handling of the option
doesn't allow enabling them. This patch makes an ON value of
`LLVM_ENABLE_UNWIND_TABLES` actually enable unwind tables.
Differential Revision: https://reviews.llvm.org/D144178
else()
if(LLVM_COMPILER_IS_GCC_COMPATIBLE)
list(APPEND LLVM_COMPILE_FLAGS "-fno-exceptions")
- if(NOT LLVM_ENABLE_UNWIND_TABLES)
+ if(LLVM_ENABLE_UNWIND_TABLES)
+ list(APPEND LLVM_COMPILE_FLAGS "-funwind-tables")
+ else()
list(APPEND LLVM_COMPILE_FLAGS "-fno-unwind-tables")
list(APPEND LLVM_COMPILE_FLAGS "-fno-asynchronous-unwind-tables")
endif()