A tweak was made to dependencies in #38451 but the makefiles weren't updated to
accompany this. Instead of trying to integerate the `build_helper` crate into
the makefiles (which currently isn't present) this commit takes the approach of
just duplicating the required logic, which should be small enough for now.
rustbuild: Actually test musl on the musl bot
A typo unfortunately meant that we haven't been testing musl for a bit, so now
it's time to discover if we accidentally introduced a regression!
travis: Fix the cargotest bot
Recently the Cargo revision running on cargotest was updated in #38051, and the
updated version of Cargo pulls in the openssl-sys 0.9 crate instead of the old
openssl-sys 0.7 crate. The 0.9 release of openssl-sys has slightly different
requirements and logic for detecting OpenSSL, namely it requires `pkg-config` to
be present on Linux typically.
This commit fixes this problem by installing pkg-config in the cargotest
container that's running on the bots. This in turn should hopefully fix the
build script and allow it to find the already-installed local OpenSSL libraries.
rustbuild: Run debuginfo tests by default
This fixes an accidental regression in rustbuild which stopped running debuginfo
tests by default. Here we flag the test suites as `default(true)` to ensure that
they're run on bots, for example.
rustbuild: Update Cargo download location
I updated the beta compiler used to bootstrap the master branch in #38438 with
the intention of fixing Travis OSX linkage issues but I mistakenly forgot that
the PR only updated rustc, not Cargo itself. Cargo has a new release process
with downloads in a different location, so this commit updates rustbuild to
download from this new location by tracking revisions instead of Cargo nightly
dates.
rustbuild: Eliminate duplication of dist tarballs
Fixes#38365 by not constructing the duplicate steps in the first place, as suggested. The source package step is lacking the check as in other steps, so it is added as well.
Tested locally with the `alexcrichton/rust-slave-linux-cross:2016-11-11` container (with the build slave init replaced with no-op, of course).
r? @alexcrichton
target spec: add an asm-args field to pass arguments to the external ..
assembler
The main use case is the (still out of tree) msp430 target. For that target we use an external assembler, `mps430-elf-gcc`, to produce object files from the assembly rustc/llvm outputs. The problem is that by default `msp430-elf-gcc` produces object files for the MSP430**X** ABI but we want to use produce objects using the MSP430 (note: no X) ABI. To do that we have to pass `-mcpu=msp430` to the assembler and that's what this flag is for.
r? @alexcrichton
cc @pftbest
adaptation to rustbuild for openbsd
Since the switch to rustbuild, the build for openbsd is broken:
- [X] `ar` inference based on compiler name is wrong (OpenBSD usually use `egcc`, but `ear` doesn't exist)
- [X] `make` isn't GNU-make under OpenBSD (and others BSD platforms)
- [x] `stdc++` isn't the right stdc++ library to link with (it should be `estdc++`)
- [x] corrects tests that don't pass anymore (problems related to rustbuild)
r? @alexcrichton
Minor fix in the merge_sort comments
There was an off-by-one error discovered by @tbelaire.
So, to repeat... the two invariants we are enforcing are:
1. Run lengths are decreasing.
2. Sum of lengths of any two adjacent runs is less than the length of
their predecessor.
This commit changes the relevant comment to be clearer and have correct bounds on `i`.
r? @bluss
Cleanup refactoring around DefPath handling
This PR makes two big changes:
* All DefPaths of a crate are now stored in metadata in their own table (as opposed to `DefKey`s as part of metadata `Entry`s.
* The compiler will no longer allocate a pseudo-local DefId for inlined HIR nodes (because those are gross). Inlined HIR nodes will have a NodeId but they don't have there own DefId anymore. Turns out they were not needed anymore either. Hopefully HIR inlining will be gone completely one day but if until then we start needing to be able to map inlined NodeIds to original DefIds, we can add an additional table to metadata that allows for reconstructing this.
Overall this makes for some nice simplifications and removal of special cases.
r? @eddyb
cc @rust-lang/compiler
rustbuild: Stop building docs for libtest by default
They cause the search index from the std docs to get overwritten just like #34800.
Part of #38319.
Add prefix to config.toml
This allows `rustbuild` to be used to install to a prefix.
```toml
[build]
prefix = "/path/to/install"
```
For example, the following `config.toml` will cause `x.py dist --install` to install to `/path/to/install`
Expand E0309 explanation with motivating example
I recently started reading @Gankro's "[Learning Rust With Entirely Too Many Linked Lists](http://cglab.ca/~abeinges/blah/too-many-lists/book/README.html)", and came across [a part](http://cglab.ca/~abeinges/blah/too-many-lists/book/second-iter.html) where he comes across `E0309`, and after showing `rustc --explain E0309` prompty says
> This is dumb. I think it's dumb. You have to do it.
Humor aside, I think this says something about the current explanation being somewhat lacking.
This patch introduces a motivating example saying why `T: 'a` is a necessary restriction. Hopefully, this will help new Rustaceans understand why leaving out the `'a` bound on `T` might lead to broken code.
A more verbose matching failure for mir tests
This makes it easier to work with mir test failures during development.
- Show which expected line was not found
- Show full expected output
- Show full actual output
Point out the known type when field doesn't satisfy bound
For file
```rust
use std::path::Path;
fn f(p: Path) { }
```
provide the following error
```nocode
error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied in `std::path::Path`
--> file.rs:3:6
|
3 | fn f(p: Path) { }
| ^ within `std::path::Path`, the trait `std::marker::Sized` is not implemented for `[u8]`
|
= note: `[u8]` does not have a constant size known at compile-time
= note: required because it appears within the type `std::path::Path`
= note: all local variables must have a statically known size
```
Fix#23286.
Add From<[u16; 8]> to Ipv6Addr
Not really sure that this requires an RFC, but I figured that I'd offer a pull request and see what people think. It seems like a reasonable addition.
Use Borrow for binary_search and contains methods in the standard library
Fixes all standard library methods in #32822 that can be fixed without backwards compatibility issues.
This fixes an accidental regression in rustbuild which stopped running debuginfo
tests by default. Here we flag the test suites as `default(true)` to ensure that
they're run on bots, for example.
We only want to package each host/target once for `dist`. The obvious
solution takes the form of step dependency, which is implemented at
least for the `dist-rustc` step. Unfortunately since the steps are
created from `hosts x targets` during planning and *not* de-duplicated
afterwards, the problem still persists.
We therefore move the check inside `plan()` instead, to avoid creating
the duplicate steps in the first place.