Skip to content

Commit d547005

Browse files
authored
[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.
1 parent 76d5a79 commit d547005

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang-rt/cmake/modules/AddFlangRT.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ function (add_flangrt_library name)
198198
# Use compiler-specific options to disable exceptions and RTTI.
199199
if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
200200
target_compile_options(${tgtname} PRIVATE
201-
$<$<COMPILE_LANGUAGE:CXX>:-fno-exceptions -fno-rtti -fno-unwind-tables -fno-asynchronous-unwind-tables>
201+
$<$<COMPILE_LANGUAGE:CXX>:-fno-exceptions -fno-rtti -funwind-tables -fno-asynchronous-unwind-tables>
202202
)
203203
elseif (MSVC)
204204
target_compile_options(${tgtname} PRIVATE

0 commit comments

Comments
 (0)