Hacker News new | ask | show | jobs
by krackers 959 days ago
If you're on mac (where I assume the two are already available), what compiler flags need to be passed in to do this?
1 comments

$ 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!