Reenable opt-level 3
This comment is quite old, let's see what would happen with current MSVC.
Since there's no AppVeyor test for PR, the best way is to try if it get through homu. I don't recommend doing this in roll-up.
debuginfo: Generate unique DW_AT_names for compilation units to work around OSX linker bug
This should fix issue #39160 and does not seem to cause any problems.
cc @tromey, @Manishearth
r? @jdm
rustdoc: Fix implementors list javascript
* Use a different loop variable, `i` was already taken. This caused
missing items in the implementors list.
* Use `.getAttribute('href')` rather than `.href` to get the relative
URL which is what it needs to actually fix the links.
More fallout from #41307.
r? @GuillaumeGomez
Give a nicer error for non-Unicode arguments to rustc and rustdoc
Previously, any non-Unicode argument would panic rustc:
```
$ rustc $'foo\x80bar'
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report:
https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value:
"foo�bar"', /checkout/src/libcore/result.rs:859 note: Run with
`RUST_BACKTRACE=1` for a backtrace.
```
Now it gives a clean error:
```
$ rustc $'foo\x80bar'
error: Argument 1 is not valid Unicode: "foo�bar"
```
Maybe fixes#15890, although we still can't *compile* arbitrary file names.
incr. comp.: Use more bits for DefPath hashes
Use 128 instead of 64 bits for DefPath hashes, like we do for everything else. Collision probability is unnecessarily high with 64 bits.
Also change the representation of `ich::Fingerprint` from `Fingerprint([u8; 16])` to `Fingerprint(u64, u64)` which is better for hashers like `FxHasher`.
rustbuild: install improvements
Install rust-analysis and rust-src to get in par with what we can get from rustup.
Allow bypassing the vendoring of dependencies. When we only build to install and not to redistribute dist tarballs, that part is not necessary, so avoid trying to install cargo-vendor.
Improve the error management when /proc is not mounted
This PR does two things:
* Triggers an error on GNU/Linux & Android when /proc/self/exe doesn't exist
* Handle the error properly
add -Z pre-link-arg{,s} to rustc
This PR adds two unstable flags to `rustc`: `-Z pre-link-arg` and `-Z
pre-link-args`. These are the counterpart of the existing `-C link-arg{,s}`
flags and can be used to pass extra arguments at the *beginning* of the linker
invocation, before the Rust object files are passed.
I have [started] a discussion on the rust-embedded RFCs repo about settling on a
convention for passing extra arguments to the linker and there are two options
on discussion: `.cargo/config`'s `target.$T.rustflags` and custom target
specification files (`{pre,,post}-link-args` fields). However, to compare these
two options on equal footing this `-Z pre-link-arg` feature is required.
[started]: https://github.com/rust-embedded/rfcs/pull/24
Therefore I'm requesting landing this `-Z pre-link-arg` flag as an experimental
feature to evaluate these two options.
cc @brson
r? @alexcrichton
ci: allows files to be shared by docker images
Change `src/ci/docker/run.sh` to allow files to be shared when building docker containers. For while, only android related shell scripts are shared. Others containers can be updated at any time.
sccache is installed last, as it is frequently updated this avoids the need to rebuilt the whole container.
Improve docs in os::windows::ffi and os::windows::fs
Part of #29367
This PR makes changes to the documentation in `os::windows::ffi` and `os::windows::fs` with the goal of fleshing them out and bringing them in line with Rust's quality standards.
r? @steveklabnik
- Remove `()` parens when referencing functions in docs.
- Change some examples to be no_run instead of ignore.
- Normalize style in examples for `OpenOptionsExt`.
- Fix typo in windows mod docs.
* Use a different loop variable, `i` was already taken. This caused
missing items in the implementors list.
* Use `.getAttribute('href')` rather than `.href` to get the relative
URL which is what it needs to actually fix the links.
Previously, any non-Unicode argument would panic rustc:
```
$ rustc $'foo\x80bar'
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report:
https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value:
"foo�bar"', /checkout/src/libcore/result.rs:859 note: Run with
`RUST_BACKTRACE=1` for a backtrace.
```
Now it gives a clean error:
```
$ rustc $'foo\x80bar'
error: Argument 1 is not valid Unicode: "foo�bar"
```
Maybe fixes#15890, although we still can't *compile* arbitrary file names.
Introduce a new Installer object that hold a reference to all the
configured paths for installation
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Enable cross-crate incremental compilation by default.
Now that direct metadata hashing has been implemented for a while and we haven't seen any problems with it over at [rust-icci](https://travis-ci.org/rust-icci/), let's re-enable cross crate support for incremental compilation again.
r? @nikomatsakis
Unify tools building
Close#41601
Time saving for up to 10 minutes. Cargo is now only compiled once.
Downsides:
- Out of tree Cargo.lock maintenance
- Cargo.toml `[replace]` version maintenance
Remove interior mutability from TraitDef by turning fields into queries
This PR gets rid of anything `std::cell` in `TraitDef` by
- moving the global list of trait impls from `TraitDef` into a query,
- moving the list of trait impls relevent for some self-type from `TraitDef` into a query
- moving the specialization graph of trait impls into a query, and
- moving `TraitDef::object_safety` into a query.
I really like how querifying things not only helps with incremental compilation and on-demand, but also just plain makes the code cleaner `:)`
There are also some smaller fixes in the PR. Commits can be reviewed separately.
r? @eddyb or @nikomatsakis