rust/mk
Alex Crichton 0ec321f7b5 rustc: Implement custom panic runtimes
This commit is an implementation of [RFC 1513] which allows applications to
alter the behavior of panics at compile time. A new compiler flag, `-C panic`,
is added and accepts the values `unwind` or `panic`, with the default being
`unwind`. This model affects how code is generated for the local crate, skipping
generation of landing pads with `-C panic=abort`.

[RFC 1513]: https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md

Panic implementations are then provided by crates tagged with
`#![panic_runtime]` and lazily required by crates with
`#![needs_panic_runtime]`. The panic strategy (`-C panic` value) of the panic
runtime must match the final product, and if the panic strategy is not `abort`
then the entire DAG must have the same panic strategy.

With the `-C panic=abort` strategy, users can expect a stable method to disable
generation of landing pads, improving optimization in niche scenarios,
decreasing compile time, and decreasing output binary size. With the `-C
panic=unwind` strategy users can expect the existing ability to isolate failure
in Rust code from the outside world.

Organizationally, this commit dismantles the `sys_common::unwind` module in
favor of some bits moving part of it to `libpanic_unwind` and the rest into the
`panicking` module in libstd. The custom panic runtime support is pretty similar
to the custom allocator support with the only major difference being how the
panic runtime is injected (takes the `-C panic` flag into account).
2016-05-09 08:22:36 -07:00
..
cfg Add armv7-linux-androideabi target. 2016-05-07 13:29:57 +03:00
clean.mk Added missing argument to 'find' 2015-10-27 23:47:53 +13:00
crates.mk rustc: Implement custom panic runtimes 2016-05-09 08:22:36 -07:00
ctags.mk Add TAGS.rustc.emacs/TAGS.rustc.vi make targets, (re-)including rustc source. 2016-04-28 15:01:47 +02:00
debuggers.mk Distribute both rust-lldb and rust-gdb everywhere except win-msvc 2016-05-06 03:09:48 +00:00
dist.mk specify the archive file as stdout 2016-05-05 06:48:35 +02:00
docs.mk mk: Move disable-jemalloc logic into makefiles 2016-02-25 21:05:59 -08:00
grammar.mk Revert "mk: fix some undefined variable warnings" 2016-02-01 23:27:04 -08:00
host.mk mk: Move disable-jemalloc logic into makefiles 2016-02-25 21:05:59 -08:00
install.mk mk: Move disable-jemalloc logic into makefiles 2016-02-25 21:05:59 -08:00
llvm.mk rustc_llvm: Tweak how initialization is performed 2016-02-11 11:12:33 -08:00
main.mk Distribute both rust-lldb and rust-gdb everywhere except win-msvc 2016-05-06 03:09:48 +00:00
platform.mk mk: Fix building with --enable-ccache 2016-05-05 09:12:24 -07:00
prepare.mk mk: Move disable-jemalloc logic into makefiles 2016-02-25 21:05:59 -08:00
reconfig.mk mk: Bootstrap from stable instead of snapshots 2016-04-19 10:56:49 -07:00
rt.mk Rollup merge of #32686 - mneumann:dragonfly_jemalloc_prefix, r=alexcrichton 2016-04-05 16:43:21 +05:30
rustllvm.mk Implement feature extraction from TargetMachine 2016-04-09 00:39:04 +02:00
stage0.mk mk: Bootstrap from stable instead of snapshots 2016-04-19 10:56:49 -07:00
target.mk mk: Bootstrap from stable instead of snapshots 2016-04-19 10:56:49 -07:00
tests.mk rustc: Implement custom panic runtimes 2016-05-09 08:22:36 -07:00
util.mk