From 57260262e76ec35f05d4a9fad4d13cda212f2c62 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 18 Jun 2015 15:24:36 -0700 Subject: [PATCH] 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. --- src/librustc_trans/trans/base.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/librustc_trans/trans/base.rs b/src/librustc_trans/trans/base.rs index c2293dcc6d483..b382b71343f4e 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; }