]> git.lizzy.rs Git - rust.git/commit
auto merge of #10916 : alexcrichton/rust/nounwind, r=pcwalton
authorbors <bors@rust-lang.org>
Fri, 13 Dec 2013 20:56:36 +0000 (12:56 -0800)
committerbors <bors@rust-lang.org>
Fri, 13 Dec 2013 20:56:36 +0000 (12:56 -0800)
commit378897a09c4c72595d450f74f2ffbb1ab44958a2
tree029b82798846a0addae26001a7fa831e5f40aa54
parentae3078ca257fe39a7fdc84bdfb81778b2542c520
parent667d114f47ae658894c496dbf07a8d29c737c877
auto merge of #10916 : alexcrichton/rust/nounwind, r=pcwalton

When performing LTO, the rust compiler has an opportunity to completely strip
all landing pads in all dependent libraries. I've modified the LTO pass to
recognize the -Z no-landing-pads option when also running an LTO pass to flag
everything in LLVM as nothrow. I've verified that this prevents any and all
invoke instructions from being emitted.

I believe that this is one of our best options for moving forward with
accomodating use-cases where unwinding doesn't really make sense. This will
allow libraries to be built with landing pads by default but allow usage of them
in contexts where landing pads aren't necessary.
src/librustc/driver/session.rs
src/librustc/middle/trans/base.rs
src/librustc/middle/trans/glue.rs