Commit Graph

165 Commits

Author SHA1 Message Date
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
Mazdak Farrokhzad 2ac8ec0463
Rollup merge of #61095 - ehuss:update-cargo, r=alexcrichton
Update cargo

Update cargo

14 commits in c4fcfb725b4be00c72eb9cf30c7d8b095577c280..545f354259be4e9745ea00a524c0e4c51df01aa6
2019-05-15 19:48:47 +0000 to 2019-05-23 17:45:30 +0000
- Bump to 0.38.0 (rust-lang/cargo#6979)
- cargo package: detect new empty directories (rust-lang/cargo#6973)
- Add message caching. (rust-lang/cargo#6933)
- Fix typo (rust-lang/cargo#6974)
- Set `Finished` line correctly for debug=0. (rust-lang/cargo#6971)
- Clippy fixes (rust-lang/cargo#6970)
- Remove rustdoc `can_add_color_process`. (rust-lang/cargo#6968)
- Document new `doctest` field. (rust-lang/cargo#6965)
- Update some man pages that missed --offline. (rust-lang/cargo#6964)
- add public & private prop tests. (rust-lang/cargo#6962)
- zsh completion: Pull list of commands from cargo --list (rust-lang/cargo#6956)
- Change docs "inequality" for semver requirement. (rust-lang/cargo#6963)
- Update im-rc requirement from 12.1.0 to 13.0.0 (rust-lang/cargo#6959)
- Add `doctest` field into metadata (rust-lang/cargo#6953)
2019-05-25 04:55:29 +02:00
Eric Huss d5e03530f7 Update cargo 2019-05-23 13:27:49 -07:00
John Kåre Alsaker 5bcc80be10 Update Cargo.lock 2019-05-23 18:51:48 +02:00
Alex Crichton e59f0cc0d3 Bump compiler-builtins to 0.1.15
This commit bumps the `compiler-builtins` dependency to 0.1.15 which
expects to have the source for `compiler-rt` provided externally if the
`c` feature is enabled. This then plumbs through the necessary support
in the build system to ensure that if the `llvm-project` directory is
checked out and present that we enable the `c` feature of
`compiler-builtins` and compile in all the C intrinsics.
2019-05-22 07:46:36 -07:00
Alex Crichton 3c9790e429 Update the compiler_builtins crate
This updates to 0.1.13 for `compiler_builtins`, published to fix a few
issues. The feature changes here are updated because `compiler_builtins`
no longer enables the `c` feature by default but we want to do so
through our build still.

Closes #60747
Closes #60782
2019-05-17 07:17:15 -07:00
Mazdak Farrokhzad 23d91e272b
Rollup merge of #60805 - euclio:filetime-dep, r=Mark-Simulacrum
remove compiletest's dependency on `filetime`
2019-05-17 02:54:14 +02:00
Eric Huss 6a09cfab0b Update cargo 2019-05-16 10:31:13 -07:00
Wesley Wiser ea93215576 Bump measureme dependency to 0.3
measureme@0.3 adds a version header to the binary file format which will
help reduce tool breakage in the future.
2019-05-13 22:15:55 -04:00
Andy Russell 01bc58c5ee
remove compiletest's dependency on `filetime` 2019-05-13 17:42:55 -04:00
Manish Goregaokar d17713599c Update clippy 2019-05-11 09:02:12 -07:00
Mazdak Farrokhzad f27f14b60f
Rollup merge of #60671 - euclio:extern-crate, r=Centril
remove unneeded `extern crate`s from build tools
2019-05-09 23:56:16 +02:00
Andy Russell b2f71fb540
remove unneeded `extern crate`s from build tools 2019-05-09 12:03:13 -04:00
Alex Crichton 7e8035593d std: Update compiler-builtins crate
Pulls in a fix for ensuring that wasm targets have code in
compiler-builtins for `ldexp` which LLVM can generate references to.
2019-05-08 06:59:24 -07:00
Eric Huss fc72e56e78 Update cargo 2019-05-06 18:19:21 -07:00
varkor 80f54ba881 Update Cargo.lock 2019-05-05 10:45:10 +01:00
Vadim Petrochenkov f5b5ca8b23 Revert Cargo.lock changes accidentally introduced during rebase 2019-05-05 00:12:38 +03:00
Jesper Steen Møller 5deec307f7 Fix #45268 by saving all NodeId's for resolved traits. 2019-05-04 20:29:33 +02:00
Dan Gohman c07b52e29a Bump libc dependency to 0.2.54. 2019-05-03 23:01:24 -07:00
Mazdak Farrokhzad 9199bb5f81
Rollup merge of #60373 - rasendubi:lang-features-sort-since, r=Centril
Tidy: ensure lang features are sorted by since

This is the tidy side of https://github.com/rust-lang/rust/issues/60361.

What is left is actually splitting features into groups and sorting by since.

This PR also likely to produce a small (a couple of lines) merge conflict with https://github.com/rust-lang/rust/pull/60362.

r? @Centril
2019-05-03 16:24:56 +02:00
varkor e72f7e1e56 Update getopts to 0.2.18
This is a proof-of-concept that the dependency unification fix works.
2019-05-02 21:47:14 +01:00
Alexey Shmalko 8b82f685a5 Make find_attr_val a little bit more precise
`find_attr_val(&line, "since")` returns `Some(", issue = ")` when
`line` is set to the following line:

```
[unstable(feature = "checked_duration_since", issue = "58402")]
```

Make `find_attr_val` use regex that is a little bit more
precise (requires `=` after key name).

It still does not handle all cases (e.g., extra leading chars in key
name, or escaped quotes in value), but is good enough for now.
2019-05-02 16:38:23 +03:00
Ralf Jung 71338fc305 update miri 2019-05-02 09:43:52 +02:00
Mazdak Farrokhzad a7cbd92d13
Rollup merge of #60385 - nnethercote:earlier-metadata, r=alexcrichton
Emit metadata files earlier

This will make cargo pipelining much more effective.
2019-05-02 01:09:26 +02:00
Nicholas Nethercote 38dffeba21 Move metadata writing earlier.
The commit moves metadata writing from `link_binary` to
`encode_metadata` (and renames the latter as
`encode_and_write_metadata`). This is at the very start of code
generation.
2019-05-01 17:17:13 +10:00
Mazdak Farrokhzad 1ec56d8550
Rollup merge of #60238 - topecongiro:rustfmt-1.2.2, r=alexcrichton
Update rustfmt to 1.2.2
2019-04-30 03:28:37 +02:00
Manish Goregaokar 505cae2a76 Update clippy 2019-04-29 08:48:17 -07:00
topecongiro 710083c09d Update rustfmt to 1.2.2 2019-04-27 18:07:41 +09:00
John Kåre Alsaker 0e05a9bb85 Update rustc-rayon version 2019-04-26 19:08:36 +02:00
Mazdak Farrokhzad 878a7d6ea5
Rollup merge of #60134 - GuillaumeGomez:fix-index-page, r=Manishearth
Fix index-page generation

Fixes #60096.

The minifier was minifying crates name in `searchIndex` key position, which was a bit problematic for multiple reasons.

r? @rust-lang/rustdoc
2019-04-26 03:50:14 +02:00
Matthias Krüger f9945f58e2 submodules: update clippy from 9897442f to 8c0e038f
Changes:
````
Rustup for https://github.com/rust-lang/rust/pull/59042
Update pulldown_cmark to 0.5
Only run AppVeyor on r+, try and the master branch
Remove approx_constant known problems
Suppress let_and_return if let has attributes
Add test for or_fun_call macro suggestion
UI test cleanup: Extract needless_range_loop tests
Change "if types change" to "if you later change the type"
````
2019-04-25 13:18:44 +02:00
Eric Huss 882352a279 Update cargo, books 2019-04-23 21:39:27 -07:00
Amanieu d'Antras e7f162fdd8 Update hashbrown to 0.3.0 2019-04-24 06:54:14 +08:00
Amanieu d'Antras ae388773e1 Update hashbrown to 0.2.2 2019-04-24 06:54:14 +08:00
Amanieu d'Antras 5253366e19 Update hashbrown to 0.2.1 2019-04-24 06:54:14 +08:00
Amanieu d'Antras 1fa7a21534 Make libstd depend on the hashbrown crate 2019-04-24 06:54:14 +08:00
Guillaume Gomez d676386b1e Fix index-page generation 2019-04-23 22:44:27 +02:00
Andy Russell 303016485b
upgrade rustdoc's pulldown-cmark to 0.4.1 2019-04-22 09:11:26 -04:00
Igor Matuszewski 4fb570dea7 Switch to serde-enabled rls-* and update RLS appropriately
This also bumps RLS version to 1.36.
The updated rls-* packages use serde but *not* serde_derive thanks to
manual proc macro expansion. This is a hack, since rustc cannot handle
crates.io proc macros (duplicated in tools) when cross-compiling, so
that's the best we can do in order to support serde_json in save-analysis.
2019-04-21 12:52:07 +02:00
Igor Matuszewski 25451967ee save-analysis: Use serde instead of libserialize to dump JSON data 2019-04-21 12:45:16 +02:00
bjorn3 93a3b414e3 Move almost all of cg_llvm/back/link.rs to cg_ssa 2019-04-20 13:21:40 +02:00
Matthias Krüger 7b959c69a2 submodules: update clippy from fbb3a47b to cafbe7f2
Changes:
````
Update compiletest_rs
Typo
Fix dogfood error
Add lint PathBufPushOverwrite
Update *.stderr file
Remove code duplication
Format code
Add test for debug_assert!(false)
Don't lint debug_assert!(false)
Add run-rustfix for option_map_or_none lint
Move two cast_lossless tests to their correct files
Change naive_bytecount applicability MaybeIncorrect
Add tests for declare_lint_pass and impl_lint_pass
Use lint pass macros
Document `declare_lint_pass!`
Fix lint_without_lint_pass internal lint
Use {get,match}_def_path from LateContext
Remove uplifted functions {get,match}_def_path from Clippy
Add run-rustfix for len_zero lint
Add run-rustfix for bool_comparison lint
Add run-rustfix for deref_addrof lint
while_let_loop uses placeholders in suggestions
Remove rust-toolchain file from clippy_dev
Update adding_lints.md
Update PULL_REQUEST_TEMPLATE
Add new lint checklist
Create PULL_REQUEST_TEMPLATE
Only suggest .copied() for Option right now
Also suggest .copied() when .clone() is called on a Copy type
Suggest .copied() instead of .cloned() in map_clone when dealing with references
Deny rustc internal lints
Remove clippy::default_hash_types internal lint
Enable -Zunstable-options in .cargo/config
````
2019-04-19 20:43:22 +02:00
topecongiro ca19ffe13f Update rustfmt to 1.2.1 2019-04-18 07:46:16 +09:00
Eric Huss df7445b780 Update cargo 2019-04-16 11:01:01 -07:00
John Kåre Alsaker b82ab24bbf Preallocate BUILTIN_ATTRIBUTES symbols and use a hash map instead of looping 2019-04-15 15:20:05 +02:00
John Kåre Alsaker 10855a36b5 Use a proc macro to declare preallocated symbols 2019-04-15 07:23:01 +02:00
Mazdak Farrokhzad b9da8a7144
Rollup merge of #59856 - albins:update-polonius, r=nikomatsakis
update polonius-engine

This updates polonius-engine to [version 0.7.0](https://github.com/rust-lang/polonius/blob/master/RELEASES.md#v070), which adds a hybrid algorithm that starts off with performing a cheaper, location-insensitive analysis before proceeding with the full analysis.

r? @nikomatsakis
2019-04-14 17:49:18 +02:00
Ralf Jung 3f858516c0 update miri 2019-04-14 11:02:18 +02:00
Wesley Wiser 56e434d84d Use measureme in self-profiler
Related to #58372
Related to #58967
2019-04-12 20:27:29 -04:00
Albin Stjerna c440c0a0fd update polonius-engine 2019-04-10 22:44:07 +02:00