From d547005f6c2bf6fbee9fe0f4f99bb6ac2d5b04ab Mon Sep 17 00:00:00 2001 From: Slava Zakharin Date: Tue, 11 Mar 2025 16:14:53 -0700 Subject: [PATCH] [flang-rt] Enable -funwind-tables so that backtrace works. (#130848) `backtrace` will not show anything unless it can unwind from Fortran runtime, so it is useful to have this ability even in the release build. --- flang-rt/cmake/modules/AddFlangRT.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flang-rt/cmake/modules/AddFlangRT.cmake b/flang-rt/cmake/modules/AddFlangRT.cmake index c9a180e16163..2292732daba6 100644 --- a/flang-rt/cmake/modules/AddFlangRT.cmake +++ b/flang-rt/cmake/modules/AddFlangRT.cmake @@ -198,7 +198,7 @@ function (add_flangrt_library name) # Use compiler-specific options to disable exceptions and RTTI. if (LLVM_COMPILER_IS_GCC_COMPATIBLE) target_compile_options(${tgtname} PRIVATE - $<$:-fno-exceptions -fno-rtti -fno-unwind-tables -fno-asynchronous-unwind-tables> + $<$:-fno-exceptions -fno-rtti -funwind-tables -fno-asynchronous-unwind-tables> ) elseif (MSVC) target_compile_options(${tgtname} PRIVATE