Commit Graph

91008 Commits

Author SHA1 Message Date
Eduard-Mihai Burtescu
3e1cef7007 rustc: pass Option<&Substs> and Namespace around in ty::item_path. 2019-03-15 13:25:10 +02:00
sntdevco
e9e5a75fd2 Improved test output for estr-slice 2019-03-15 16:38:51 +05:30
sntdevco
2f52388671 Improved test output for libcore/num/int_macros 2019-03-15 16:38:37 +05:30
sntdevco
8ff2198bc7 Improved test output for libcore/ops 2019-03-15 16:38:23 +05:30
sntdevco
6d73a8f753 Improved test output for libcore/cell 2019-03-15 16:38:07 +05:30
sntdevco
9445f2bf71 Improved test output for liballoc/str 2019-03-15 16:37:53 +05:30
bors
16e7e05e95 Auto merge of #58575 - mati865:musl_toolchain, r=alexcrichton
Musl host toolchain

Based on https://github.com/rust-lang/rust/pull/55163 and https://github.com/rust-lang/rust/pull/57359
Depends on https://github.com/rust-lang/rust/pull/55566

CC https://github.com/rust-lang/rust/issues/57439

### How it works

Tested compiler made by `dist` on glibc and musl based distributions and verified binaries it produces:
* Ubuntu (glibc) - installed it as a target for host toolchain and observed no regressions for static (default) linking, dynamic linking apparently requires musl build libgcc so I didn't test it.
* Alpine (musl) - installed as the host toolchain, by default it links statically (executables are portable and work on glibc distributions) but with `-C target-feature=-crt-static` Rust flag it links dynamically (executables require musl built libraries).

### What's debatable

It should be decided whether this toolchain should link dynamically or statically when using it on musl distribution. I believe the distributions would prefer dynamic linking but it'd be misleading because `$ARCH-unknown-linux-musl` target links statically on the other hosts.
Another problem is using `RUSTFLAGS='-C target-feature=-crt-static'` for dynamic builds which is really uncomfortable.

To address both issues I suggest leaving `$ARCH-unknown-linux-musl` static for both host and cross target and introducing "alias triple" `$ARCH-unknown-linux-dynmusl`. It'd be the same as `$ARCH-unknown-linux-musl` (and use the same libraries to avoid duplication) but it'd link dynamically.

<del>
### Why it's still WIP (help wanted)

I'm having a hard time getting all tests to pass and I'd appreciate help.

Non-verbose error:
<details>

```
Testing proc_macro stage1 (x86_64-unknown-linux-musl -> x86_64-unknown-linux-musl)
   Compiling proc_macro v0.0.0 (/checkout/src/libproc_macro)
error[E0463]: can't find crate for `std`

error[E0463]: can't find crate for `std`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
[RUSTC-TIMING] proc_macro test:true 0.529
[RUSTC-TIMING] proc_macro test:false 0.530
error: Could not compile `proc_macro`.
warning: build failed, waiting for other jobs to finish...
error: Could not compile `proc_macro`.

To learn more, run the command again with --verbose.

command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-musl" "-j" "16" "--release" "--locked" "--manifest-path" "/checkout/src/libtest/Cargo.toml" "-p" "proc_macro" "--"
expected success, got: exit code: 101

failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --host x86_64-unknown-linux-musl --target x86_64-unknown-linux-musl
```
</details>

Verbose error:
<details>

```
Testing proc_macro stage1 (x86_64-unknown-linux-musl -> x86_64-unknown-linux-musl)
   Compiling proc_macro v0.0.0 (/checkout/src/libproc_macro)
     Running `/checkout/obj/build/bootstrap/debug/rustc --edition=2018 --crate-name proc_macro src/libproc_macro/lib.rs --color never --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=09ddd3ecc930ab63 -C extra-filename=-09ddd3ecc930ab63 --out-dir /checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/x86_64-unknown-linux-musl/release/deps --target x86_64-unknown-linux-musl -L dependency=/checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/x86_64-unknown-linux-musl/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/release/deps -C target-feature=-crt-static`
     Running `/checkout/obj/build/bootstrap/debug/rustc --edition=2018 --crate-name proc_macro src/libproc_macro/lib.rs --color never --emit=dep-info,link -C opt-level=2 --test -C metadata=a564d363930469c8 -C extra-filename=-a564d363930469c8 --out-dir /checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/x86_64-unknown-linux-musl/release/deps --target x86_64-unknown-linux-musl -L dependency=/checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/x86_64-unknown-linux-musl/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/release/deps -C target-feature=-crt-static`
error[E0463]: can't find crate for `std`
error[E0463]: can't find crate for `std`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
[RUSTC-TIMING] proc_macro test:false 0.248
error: Could not compile `proc_macro`.

Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --edition=2018 --crate-name proc_macro src/libproc_macro/lib.rs --color never --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=09ddd3ecc930ab63 -C extra-filename=-09ddd3ecc930ab63 --out-dir /checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/x86_64-unknown-linux-musl/release/deps --target x86_64-unknown-linux-musl -L dependency=/checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/x86_64-unknown-linux-musl/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/release/deps -C target-feature=-crt-static` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
[RUSTC-TIMING] proc_macro test:true 0.248
error: Could not compile `proc_macro`.

Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --edition=2018 --crate-name proc_macro src/libproc_macro/lib.rs --color never --emit=dep-info,link -C opt-level=2 --test -C metadata=a564d363930469c8 -C extra-filename=-a564d363930469c8 --out-dir /checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/x86_64-unknown-linux-musl/release/deps --target x86_64-unknown-linux-musl -L dependency=/checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/x86_64-unknown-linux-musl/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/release/deps -C target-feature=-crt-static` (exit code: 1)

command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-musl" "-j" "16" "--release" "--locked" "--manifest-path" "/checkout/src/libtest/Cargo.toml" "--verbose" "-p" "proc_macro" "--"
expected success, got: exit code: 101

failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --host x86_64-unknown-linux-musl --target x86_64-unknown-linux-musl
```

</details>

Whole tests non-verbose output: [rust-tests.log](https://github.com/rust-lang/rust/files/2879945/rust-tests.log)

I think the error is because build system (correctly?) tries to use `obj/build/x86_64-unknown-linux-musl/stage1-test/x86_64-unknown-linux-musl/release/deps` which is empty but `obj/build/x86_64-unknown-linux-gnu/stage1-test/x86_64-unknown-linux-musl/release/deps` contains required libs.
</del>
2019-03-15 11:00:13 +00:00
Eduard-Mihai Burtescu
ed2be6fa89 rustc: move the FORCE_IMPL_FILENAME_LINE handling into LocalPathPrinter. 2019-03-15 09:26:14 +02:00
Eduard-Mihai Burtescu
2386168139 rustc: explicitly pass the namespace to PrintCx::parameterized. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
08d27441ec rustc: move the formatter into ty::print::PrintCx. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
732b71a1ba rustc: add a ty::RegionKind::display_outputs_anything method to avoid printing to a string. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
329b8ca818 rustc: always rely on '_ to be not printed by ty::Region itself. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
387cacf76b rustc: remove ty::item_path::RootMode by moving local logic into the printer. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
7d211e5b12 rustc: rewrite ty::item_path to be more functional than mutation-oriented. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
7505bb6bbb rustc_codegen_utils: revert some symbol_names refactors (while keeping the functional changes). 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
1c2a3c5d79 rustc: support impl's in PrintCx::parameterized. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
fbbc7e915d rustc: rewrite PrintCx::parameterized to be much simpler and more general. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
939c69c71f rustc: use define_print! to implement fmt::{Display,Debug} for Kind. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
eb525b0916 rustc: tie the 'tcx between Print and PrintCx in ty::print. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
3bad9f7b3d rustc: implement fmt::{Debug,Display} on Ty instead of TyS. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
01fa283d6f rustc: remove fmt::{Debug,Display} from ty::TyKind. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
0b3ab4018b rustc: keep a TyCtxt in PrintCx and use it instead of ty::tls. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
5f3841ca2f rustc: rename PrintContext to PrintCx. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
c684814102 rustc: don't support missing TLS TyCtxt in ty::print. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
852fc6d2b6 rustc: don't support tcx.lift returning None in ppaux. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
372b1a5930 rustc: uniformize all lift expect messages to "could not lift for printing". 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
297546e62d rustc: add a 'tcx parameter to Print. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
382d24e7d7 rustc: start moving util::ppaux to ty::print. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
228d6f45d8 rustc: remove unnecessary extern_prelude logic from ty::item_path. 2019-03-15 09:26:13 +02:00
bors
70d1150478 Auto merge of #58710 - EdorianDark:master, r=sfackler
Add clamp for ranges. Implements #44095

Ready for merge
2019-03-15 06:23:21 +00:00
O01eg
bcf1a179ae
Output diagnostic information for rustdoc.
Use the information same as rustc.
2019-03-15 08:50:08 +03:00
Mateusz Mikuła
451343e0f3
Fix TARGET variable in musl-toolchain.sh 2019-03-15 01:19:54 +01:00
Tyler Mandry
7c59ce9f5d Add -Z allow_features=... flag 2019-03-14 15:42:20 -07:00
Tyler Mandry
fa8fd3daa7 Add support for comma-separated option lists 2019-03-14 15:06:12 -07:00
lukaslueg
d1fcd86738
Update sources.rs
The current language may be amusing, yet is just imprecise and most especially difficult to understand for someone who speaks English as a foreign language.
2019-03-14 17:06:46 +01:00
Mateusz Mikuła
f364f483a3 Address final review 2019-03-14 16:55:47 +01:00
bors
bc44841ad2 Auto merge of #59181 - RalfJung:miri, r=oli-obk
update miri

Fixes https://github.com/rust-lang/rust/issues/59059

r? @oli-obk
2019-03-14 15:37:26 +00:00
Ralf Jung
51bbf30698 update miri 2019-03-14 15:25:23 +01:00
Taiki Endo
ab19e5870e Use try blocks in rustc_codegen_ssa 2019-03-14 23:12:56 +09:00
bors
3163c58ea5 Auto merge of #58176 - Zoxc:lint-levels, r=oli-obk
Only insert nodes which changes lint levels in the LintLevelMap

r? @eddyb
2019-03-14 12:09:13 +00:00
bors
2a8f6a7806 Auto merge of #58488 - wesleywiser:llvm_prof, r=michaelwoerister
Replace TimeLine LLVM profiling with the self profiler
2019-03-14 08:38:56 +00:00
John Kåre Alsaker
41cdf07483 Run RustdocUi earlier 2019-03-14 06:35:48 +01:00
John Kåre Alsaker
88d43a052a Don't run test launching echo since that doesn't exist on Windows 2019-03-14 05:53:44 +01:00
Emilio Cobos Álvarez
e7b7c417e6 bootstrap: Default to a sensible llvm-suffix.
I used version-channel-sha, hopefully that should work.

I checked that bootstrap builds, but I cannot check anything else since the llvm
build process is started from cargo, and thus calls clang, and thus I hit the
same bug I hope to fix with this change.

Hopefully fixes #59034.
2019-03-14 03:06:45 +01:00
bors
0ad3207745 Auto merge of #59120 - alexreg:move-issue-tests-1, r=varkor
Moved issue tests to subdirs and normalised names

Consistency, decluttering, ease of navigation :-)

r? @Centril
2019-03-14 01:28:18 +00:00
Alexander Regueiro
fe30743c79 Moved issue tests to subdirs and normalised names. 2019-03-14 01:00:49 +00:00
Mateusz Mikuła
17464a7b87 Final cleanups 2019-03-13 22:36:22 +01:00
Mateusz Mikuła
66de5c6e90 Move testing to test-various 2019-03-13 22:21:06 +01:00
Mateusz Mikuła
4dd57efae2 Disable relax relocations again 2019-03-13 22:21:06 +01:00
Mateusz Mikuła
cbc1ce0b84 Drop copyright notice from musl-toolchain 2019-03-13 22:21:06 +01:00