rustc: Don't emit compact unwind info on mac

It's not compatible with the subtlety of __morestack
This commit is contained in:
Brian Anderson 2011-12-18 00:41:26 -08:00
parent 68f4849f0f
commit cb5f636ff1
2 changed files with 9 additions and 1 deletions

View file

@ -657,6 +657,14 @@ fn link_binary(sess: session::session,
gcc_args += ["-lrt", "-ldl"];
}
// OS X 10.6 introduced 'compact unwind info', which is produced by the
// linker from the dwarf unwind info. Unfortunately, it does not seem to
// understand how to unwind our __morestack frame, so we have to turn it
// off. This has impacted some other projects like GHC.
if sess.get_targ_cfg().os == session::os_macos {
gcc_args += ["-Wl,-no_compact_unwind"];
}
// Stack growth requires statically linking a __morestack function
gcc_args += ["-lmorestack"];