Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you're on mac (where I assume the two are already available), what compiler flags need to be passed in to do this?


$ clang++ foo.cpp -o foo -framework Foundation

-lswift_Backtracing also works, but dunno if that's "public API"

$ codesign --force --sign - --entitlements entitlements.plist foo

https://github.com/apple/swift/blob/main/docs/Backtracing.rs...

$ SWIFT_BACKTRACE="enable=yes" ./foo

Very cool!




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: