summaryrefslogtreecommitdiffstats
path: root/llvm/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/cmake')
-rw-r--r--llvm/cmake/modules/AddLLVM.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 2fefe838ee4..d10831ff028 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -21,6 +21,10 @@ function(llvm_update_compile_flags name)
else()
if(LLVM_COMPILER_IS_GCC_COMPATIBLE)
list(APPEND LLVM_COMPILE_FLAGS "-fno-exceptions")
+ if(NOT LLVM_ENABLE_UNWIND_TABLES)
+ list(APPEND LLVM_COMPILE_FLAGS "-fno-unwind-tables")
+ list(APPEND LLVM_COMPILE_FLAGS "-fno-asynchronous-unwind-tables")
+ endif()
elseif(MSVC)
list(APPEND LLVM_COMPILE_DEFINITIONS _HAS_EXCEPTIONS=0)
list(APPEND LLVM_COMPILE_FLAGS "/EHs-c-")
OpenPOWER on IntegriCloud