8

Working on a WatchOS app written in Swift, I recently got the following warning in Xcode:

Could not create compact unwind for [symbol]: stack subl instruction is too different from dwarf stack size

How can I fix or silence it?

1 Answer 1

11

Thanks to this discussion, I found the suggestion of setting the following linker flag:

LDFLAGS="-Wl,-no_compact_unwind"

Where does this go in Xcode? Select the target where you're getting the warning, and search for "linker" so that you can set Other Linker Flags to -Wl,-no_compact_unwind:

Screenshot of "Other Linker Flags" set to "-Wl,-no_compact_unwind"

(This corresponds to the OTHER_LDFLAGS settings in the .pbxproj file.)

This silenced the warning for me. If anyone knows of a better way to fix or address the underlying issue, I'd love to hear it!

1
  • 1
    Warning! For me this makes exceptions not being catchable but my application (macOS) terminates with libc++abi: terminating with uncaught exception of type CoupledField::Exception: This was years before with intel and is now with M1 when using clang.
    – Fabian
    Oct 24, 2022 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.