about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-06-18 15:24:36 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-06-18 15:24:36 -0700
commit57260262e76ec35f05d4a9fad4d13cda212f2c62 (patch)
treeb6b8c3849df26359fea7b233e8ae4d98a91d0bd6
parent9cc0b2247509d61d6a246a5c5ad67f84b9a2d8b6 (diff)
downloadrust-57260262e76ec35f05d4a9fad4d13cda212f2c62.tar.gz
rust-57260262e76ec35f05d4a9fad4d13cda212f2c62.zip
rustc_trans: Disable landing pads on MSVC
Currently all these do is cause linker errors as they try to lower to GNU-like
exception handling, none of which exists with MSVC.
-rw-r--r--src/librustc_trans/trans/base.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/librustc_trans/trans/base.rs b/src/librustc_trans/trans/base.rs
index c2293dcc6d4..b382b71343f 100644
--- a/src/librustc_trans/trans/base.rs
+++ b/src/librustc_trans/trans/base.rs
@@ -756,7 +756,12 @@ pub fn invoke<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
 }
 
 pub fn need_invoke(bcx: Block) -> bool {
-    if bcx.sess().no_landing_pads() {
+    // FIXME(#25869) currently unwinding is not implemented for MSVC and our
+    //               normal unwinding infrastructure ends up just causing linker
+    //               errors with the current LLVM implementation, so landing
+    //               pads are disabled entirely for MSVC targets
+    if bcx.sess().no_landing_pads() ||
+       bcx.sess().target.target.options.is_like_msvc {
         return false;
     }