diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake @@ -25,7 +25,9 @@ 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()