about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-12-18 00:41:26 -0800
committerBrian Anderson <banderson@mozilla.com>2011-12-18 00:42:37 -0800
commitcb5f636ff14c09411c5dab7475db6802bd993f40 (patch)
tree0848b5c1f777dd117130b6a36f241ca7d69f326a /src
parent68f4849f0f52bc37fc24a36fb7e14002bdb2cd61 (diff)
downloadrust-cb5f636ff14c09411c5dab7475db6802bd993f40.tar.gz
rust-cb5f636ff14c09411c5dab7475db6802bd993f40.zip
rustc: Don't emit compact unwind info on mac
It's not compatible with the subtlety of __morestack
Diffstat (limited to 'src')
-rw-r--r--src/comp/back/link.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/comp/back/link.rs b/src/comp/back/link.rs
index 9afcc23376a..eadb7eba591 100644
--- a/src/comp/back/link.rs
+++ b/src/comp/back/link.rs
@@ -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"];