Backtrace property with swift

linux

(Leo) #1

Hi there, i am interested to know how is backtrace (https://www.gnu.org/software/libc/manual/html_node/Backtraces.html) enabled in Swift. From what i understand, flag like -rdynamic or --export-dynamic is need to pass to the linker when building swift/swiftc. However, when I look for those flags in the CMake files within swift source directory and the build.ninja file in the building directory , i could not find any.

I wonder what makes backtrace work without those flags being passed. Further, where should i pass those flags if i need to?