rust/src/tools
Alex Crichton d1040fe329 std: Depend on backtrace crate from crates.io
This commit removes all in-tree support for generating backtraces in
favor of depending on the `backtrace` crate on crates.io. This resolves
a very longstanding piece of duplication where the standard library has
long contained the ability to generate a backtrace on panics, but the
code was later extracted and duplicated on crates.io with the
`backtrace` crate. Since that fork each implementation has seen various
improvements one way or another, but typically `backtrace`-the-crate has
lagged behind libstd in one way or another.

The goal here is to remove this duplication of a fairly critical piece
of code and ensure that there's only one source of truth for generating
backtraces between the standard library and the crate on crates.io.
Recently I've been working to bring the `backtrace` crate on crates.io
up to speed with the support in the standard library which includes:

* Support for `StackWalkEx` on MSVC to recover inline frames with
  debuginfo.
* Using `libbacktrace` by default on MinGW targets.
* Supporting `libbacktrace` on OSX as an option.
* Ensuring all the requisite support in `backtrace`-the-crate compiles
  with `#![no_std]`.
* Updating the `libbacktrace` implementation in `backtrace`-the-crate to
  initialize the global state with the correct filename where necessary.

After reviewing the code in libstd the `backtrace` crate should be at
exact feature parity with libstd today. The backtraces generated should
have the same symbols and same number of frames in general, and there's
not known divergence from libstd currently.

Note that one major difference between libstd's backtrace support and
the `backtrace` crate is that on OSX the crates.io crate enables the
`coresymbolication` feature by default. This feature, however, uses
private internal APIs that aren't published for OSX. While they provide
more accurate backtraces this isn't appropriate for libstd distributed
as a binary, so libstd's dependency on the `backtrace` crate explicitly
disables this feature and forces OSX to use `libbacktrace` as a
symbolication strategy.

The long-term goal of this refactoring is to eventually move us towards
a world where we can drop `libbacktrace` entirely and simply use Gimli
and the surrounding crates for backtrace support. That's still aways off
but hopefully will much more easily enabled by having the source of
truth for backtraces live in crates.io!

Procedurally if we go forward with this I'd like to transfer the
`backtrace-rs` crate to the rust-lang GitHub organization as well, but I
figured I'd hold off on that until we get closer to merging.
2019-05-25 17:09:45 -07:00
..
build-manifest Auto merge of #60585 - sunfishcode:wasm32-wasi, r=alexcrichton 2019-05-10 07:02:38 +00:00
cargo@545f354259 Update cargo 2019-05-23 13:27:49 -07:00
cargotest Update webrender we're testing 2019-05-21 15:57:47 -07:00
clippy@a8eeb7cdb1 Update clippy submodule 2019-05-22 13:12:37 +02:00
compiletest Address CDB review feedback 2019-05-20 15:00:36 -07:00
error_index_generator Move edition outside the hygiene lock and avoid accessing it 2019-05-21 18:17:05 +02:00
linkchecker Stabilized vectored IO 2019-04-27 08:34:08 -07:00
miri@0c85dbf3df update miri 2019-05-20 10:54:36 +02:00
remote-test-client tools/remote-test-{client,server}: deny(rust_2018_idioms) 2019-03-01 11:23:25 +01:00
remote-test-server tools/remote-test-{client,server}: deny(rust_2018_idioms) 2019-03-01 11:23:25 +01:00
rls@9692ca8fd8 Update RLS 2019-05-18 22:54:33 +02:00
rust-installer@ccdc47b657 update rust-installer from 27dec6c to ccdc47b 2019-02-05 01:21:07 +09:00
rustbook Switch to SPDX 2.1 license expression 2019-05-09 15:40:01 -07:00
rustc-std-workspace-alloc Switch to SPDX 2.1 license expression 2019-05-09 15:40:01 -07:00
rustc-std-workspace-core Switch to SPDX 2.1 license expression 2019-05-09 15:40:01 -07:00
rustc-workspace-hack std: Depend on backtrace crate from crates.io 2019-05-25 17:09:45 -07:00
rustdoc Make the rustc driver and interface demand driven 2019-03-10 04:49:45 +01:00
rustdoc-js Move documentation build into bootstrap 2019-02-25 17:46:06 +01:00
rustdoc-js-std Make js tests work even with resource-suffix option 2019-03-10 23:10:40 +01:00
rustdoc-themes Transition rustdoc-theme to 2018 edition 2019-02-04 00:45:42 +09:00
rustfmt@5274b49caa Update rustfmt to 1.2.2 2019-04-27 18:07:41 +09:00
tidy std: Depend on backtrace crate from crates.io 2019-05-25 17:09:45 -07:00
unstable-book-gen Switch to SPDX 2.1 license expression 2019-05-09 15:40:01 -07:00
publish_toolstate.py Remove nrc from toolstate pings 2019-04-17 22:07:13 +12:00