-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable all unwinding on -Z no-landing-pads LTO
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. cc #10780
- Loading branch information
1 parent
b8b16ae
commit 667d114
Showing
6 changed files
with
34 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
667d114
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from pcwalton
at alexcrichton@667d114
667d114
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging alexcrichton/rust/nounwind = 667d114 into auto
667d114
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alexcrichton/rust/nounwind = 667d114 merged ok, testing candidate = 952c6b3a
667d114
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some tests failed:
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/2025
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/2934
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/2024
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/2028
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/2936
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/2027
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/2102
exception: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/2921
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/2025
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/2027
exception: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/2698
667d114
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from pcwalton
at alexcrichton@667d114
667d114
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging alexcrichton/rust/nounwind = 667d114 into auto
667d114
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alexcrichton/rust/nounwind = 667d114 merged ok, testing candidate = 378897a
667d114
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/2950
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-c/builds/794
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-t/builds/795
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/2956
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/2061
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/2059
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/2967
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/2057
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/2061
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/2969
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/2058
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/2060
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/2136
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/2954
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/2058
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/2060
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/2731
667d114
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 378897a