Commit Graph

1598 Commits

Author SHA1 Message Date
bors b78853b6fd Auto merge of #50056 - alexcrichton:update-cargo, r=Mark-Simulacrum
Update the Cargo submodule
2018-04-21 00:50:12 +00:00
kennytm 27d9691d80
Do not test RLS and rustfmt if build of these failed.
Avoid a tool being simultaneously test-pass and build-fail.
2018-04-21 00:53:36 +08:00
kennytm a543dbf620
Rollup merge of #50104 - mixi:libxml2-llvm, r=alexcrichton
Disable auto-detection of libxml2 when compiling llvm.

This broke cross-compiling rustc with internal llvm (with both the host and target being executable on the machine), because llvm's build system detected libxml2 on the host, therefore auto-enabled libxml2 support, but wouldn't compile as the target didn't have libxml2 installed.
2018-04-20 23:45:42 +08:00
Alex Crichton 924f8c7053 Update the Cargo submodule 2018-04-20 07:18:35 -07:00
Johannes Nixdorf b92e6c3de0 Disable auto-detection of libxml2 when compiling llvm. 2018-04-20 11:07:24 +02:00
varkor 261da7108d Ensure CleanTools is run for check rustdoc 2018-04-19 19:20:55 +01:00
varkor baf940d580 Add rustdoc to x.py check
This can often encounter errors after modifying rustc, so it's useful to include it in the steps that are checked.
2018-04-19 19:06:34 +01:00
bors 8a28d94ea1 Auto merge of #49900 - pnkfelix:compare-mode-nll-followup-3, r=nikomatsakis
Add src/test/ui regression testing for NLL

This PR changes `x.py test` so that when you are running the `ui` test suite, it will also always run `compiletest` in the new `--compare-mode=nll`, which just double-checks that when running under the experimental NLL mode, the output matches the `<source-name>.nll.stderr` file, if present.

In order to reduce the chance of a developer revolt in response to this change, this PR also includes some changes to make the `--compare-mode=nll` more user-friendly:

 1. It now generates nll-specific .stamp files, and uses them (so that repeated runs can reuse previously cached results).
 2. Each line of terminal output distinguishes whether we are running under `--compare-mode=nll` by printing with the prefix `[ui (nll)]` instead of just the prefix `[ui]`.

Subtask of rust-lang/rust#48879
2018-04-19 11:13:10 +00:00
bors 78fc510743 Auto merge of #49890 - varkor:xpy-check-rustc_trans, r=alexcrichton
Add rustc_trans to x.py check

r? @Mark-Simulacrum

I looked at `bootstrap/compile.rs` and `bootstrap/check.rs` to try to work out which steps were appropriate, but I'm sure I've overlooked some details here, so it's worth checking carefully I've got all the steps right (e.g. I wasn't sure whether we want to build LLVM if necessary with `x.py check`, though I thought it was probably better to than to not).

From a quick test, it seems to be working, though.
2018-04-19 06:19:27 +00:00
bors e0f9b32357 Auto merge of #50022 - nrc:doc-analysis, r=mark-simulacrum
Only emit save-analysis data for `cargo build` tasks

Previously, we were emittinng analysis data for all tasks, including `doc`. That meant we got two sets of save-analysis data, one from the normal build and one from the docs. That means indexing with the RLS took twice as long and made downloads larger and build times longer.

cc https://github.com/rust-lang-nursery/rls/issues/826

r? @Mark-Simulacrum
2018-04-18 22:30:00 +00:00
Felix S. Klock II 5589550356 Expand `x.py test` to also run with `--compare-mode=nll` on src/test/ui suite. 2018-04-18 14:47:24 +02:00
varkor 84f52a7162 Replace Build with Builder 2018-04-18 10:56:04 +01:00
varkor 1db9fabdf7 Do not rebuild LLVM for x.py check 2018-04-18 10:49:00 +01:00
varkor f31c01c713 Abstract LLVM building from bootstrap
This deduplicates the LLVM building functionality from compile.rs and check.rs.
2018-04-18 10:49:00 +01:00
varkor 49b677346f Correct the timestamp for CodegenBackend check 2018-04-18 10:44:47 +01:00
varkor b53468f500 Add rustc_trans to x.py check 2018-04-18 10:44:09 +01:00
Mark Simulacrum be1e7893d5 Remove uses of Build across Builder steps 2018-04-17 19:50:50 -06:00
Nick Cameron de34735ab2 Only emit save-analysis data for `cargo build` tasks
Previously, we were emittinng analysis data for all tasks, including `doc`. That meant we got two sets of save-analysis data, one from the normal build and one from the docs. That means indexing with the RLS took twice as long and made downloads larger and build times longer.

cc https://github.com/rust-lang-nursery/rls/issues/826
2018-04-17 21:35:10 +12:00
bors 8728c7a726 Auto merge of #49542 - GuillaumeGomez:intra-link-resolution-error, r=GuillaumeGomez
Add warning if a resolution failed

r? @QuietMisdreavus
2018-04-17 09:02:03 +00:00
bors 94516c5038 Auto merge of #50012 - Zoxc:msvc-fix, r=Mark-Simulacrum
Don't look for cc/cxx when testing with bogus targets

This fixes test builds on Windows.

r? @Mark-Simulacrum
2018-04-17 01:41:43 +00:00
John Kåre Alsaker 52e1c84732 Don't look for cc/cxx when testing with bogus targets 2018-04-17 01:59:00 +02:00
Guillaume Gomez a3ed2abed7 Fix empty tests 2018-04-16 23:37:11 +02:00
Guillaume Gomez 16a39382e2 Fix nits 2018-04-16 23:37:11 +02:00
Guillaume Gomez b2192ae157 Add rustdoc-ui test suite 2018-04-16 23:37:11 +02:00
Guillaume Gomez 035ec5bbb6 Add warning if a resolution failed 2018-04-16 23:33:43 +02:00
kennytm 34ee31d6f2
Rollup merge of #49959 - cuviper:debuginfo-tools, r=Mark-Simulacrum
rustbuild: allow building tools with debuginfo

Debugging information for the extended tools is currently disabled for
concerns about the size.  This patch adds `--enable-debuginfo-tools` to
let one opt into having that debuginfo.

This is useful for debugging the tools in distro packages.  We always
strip debuginfo into separate packages anyway, so the extra size is not
a concern in regular use.
2018-04-17 03:34:31 +08:00
kennytm e681ba22d2
Rollup merge of #49922 - f-bro:zmiri, r=oli-obk
Remove -Zmiri debugging option
2018-04-14 15:23:37 +08:00
kennytm 44a71e2e61
Rollup merge of #49908 - chrisccoulson:fix-rustdoc-themes-test-without-rpath, r=Mark-Simulacrum
Fix test failure in src/tools/rustdoc-themes when rust.rpath = false

See https://github.com/rust-lang/rust/issues/49907
2018-04-14 15:22:39 +08:00
kennytm 15eb465b35
Rollup merge of #49465 - ollie27:rustbuild_test_docs, r=steveklabnik,QuietMisdreavus,frewsxcv,GuillaumeGomez
Add docs for the test crate with the std docs

If the compiler docs aren't going to include the test crate then it may as well be included with std.

Fixes #49388
2018-04-14 15:22:17 +08:00
kennytm c22b4db0f5
Rollup merge of #49876 - oli-obk:no_secret_clippy_on_stable_☹, r=nrc
Don't inject clippy into rls on stable/beta

as discussed at the all-hands
2018-04-14 15:22:06 +08:00
Josh Stone 93734e9c46 Make debuginfo-tools always default false 2018-04-13 21:58:21 -07:00
Josh Stone bc7403d067 Avoid specific claims about debuginfo size 2018-04-13 21:57:53 -07:00
Josh Stone cc2906cb26 rustbuild: allow building tools with debuginfo
Debugging information for the extended tools is currently disabled for
concerns about the size.  This patch adds `--enable-debuginfo-tools` to
let one opt into having that debuginfo.

This is useful for debugging the tools in distro packages.  We always
strip debuginfo into separate packages anyway, so the extra size is not
a concern in regular use.
2018-04-13 16:52:54 -07:00
Fabio B 35087fcb89 Remove -Z miri debugging option 2018-04-13 09:43:10 +02:00
Chris Coulson 6f10146f9f Fix test failure in src/tools/rustdoc-themes when rust.rpath = false 2018-04-12 15:01:49 +01:00
Oliver Schneider 34956c8e8e
Don't inject clippy into rls on stable/beta 2018-04-11 14:56:59 +02:00
kennytm 4dbca4c8ac
Rollup merge of #49809 - Mark-Simulacrum:no-color-for-dumb, r=alexcrichton
Stop emitting color codes on TERM=dumb

These terminals generally don't support color.

Fixes #49191

cc @nikomatsakis

r? @alexcrichton
2018-04-11 19:56:48 +08:00
bors 43e994c8b8 Auto merge of #49715 - Mark-Simulacrum:deny-warnings, r=alexcrichton
Move deny(warnings) into rustbuild

This permits easier iteration without having to worry about warnings
being denied.

Fixes #49517
2018-04-11 03:30:04 +00:00
steveklabnik b99418d4b0 Add rustc book to the build system 2018-04-09 14:04:10 -04:00
Mark Simulacrum d326bebf91 Stop emitting color codes on TERM=dumb
These terminals generally don't support color.

Fixes #49191
2018-04-09 11:39:55 -06:00
bors 561fb39559 Auto merge of #49778 - tamird:install-relative-prefix, r=Mark-Simulacrum
rustbuild: canonicalize prefix `install_sh`

Testing:
```
  $ git diff
  diff --git a/config.toml.example b/config.toml.example
  index 9dd3002506..b47bc490cd 100644
  --- a/config.toml.example
  +++ b/config.toml.example
  @@ -196,7 +196,7 @@
   [install]

   # Instead of installing to /usr/local, install to this path instead.
  -#prefix = "/usr/local"
  +prefix = "install-prefix"

   # Where to install system configuration files
   # If this is a relative path, it will get installed in `prefix` above
  $ mkdir install-prefix
  $ ./x.py install -i --stage 0 --config config.toml.example
  ...
  $ ls install-prefix/
  bin	lib	share
```

Closes #36989.

r? @Mark-Simulacrum
2018-04-09 06:05:49 +00:00
Mark Simulacrum c115cc655c Move deny(warnings) into rustbuild
This permits easier iteration without having to worry about warnings
being denied.

Fixes #49517
2018-04-08 16:59:14 -06:00
Tamir Duberstein 94879023ad
rustbuild: canonicalize prefix `install_sh`
Testing:
```
  $ git diff
  diff --git a/config.toml.example b/config.toml.example
  index 9dd3002506..b47bc490cd 100644
  --- a/config.toml.example
  +++ b/config.toml.example
  @@ -196,7 +196,7 @@
   [install]

   # Instead of installing to /usr/local, install to this path instead.
  -#prefix = "/usr/local"
  +prefix = "install-prefix"

   # Where to install system configuration files
   # If this is a relative path, it will get installed in `prefix` above
  $ mkdir install-prefix
  $ ./x.py install -i --stage 0 --config config.toml.example
  ...
  $ ls install-prefix/
  bin	lib	share
```

Closes #36989.
2018-04-08 18:57:59 -04:00
bors 12f1ae60a9 Auto merge of #49774 - danc86:configure.py-tools, r=alexcrichton
configure.py --tools should set a list instead of a string

Currently the --tools option does not work because it is setting a string value
for 'build.tools'. It should be a list of strings instead.
2018-04-08 21:40:44 +00:00
bors b7da1aaff6 Auto merge of #49771 - tamird:incremental-no-stage-1, r=Mark-Simulacrum
Don't default to stage 1 with incremental

Closes #43177.

r? @Mark-Simulacrum
2018-04-08 19:11:47 +00:00
bors 7327d9d0e2 Auto merge of #49759 - ollie27:rustbuild_cargo, r=Mark-Simulacrum
rustbuild: Fix setting initial cargo

Fixes #49741

r? @Mark-Simulacrum
2018-04-08 16:44:22 +00:00
Dan Callaghan 51b17db770
configure.py --tools should set a list instead of a string
Currently the --tools option does not work because it is setting a string value
for 'build.tools'. It should be a list of strings instead.
2018-04-08 14:59:15 +10:00
Tamir Duberstein b204b498c5
Don't default to stage 1 with incremental
Closes #43177.
2018-04-07 22:32:21 -04:00
Oliver Middleton ccc049d547 rustbuild: Fix setting initial cargo 2018-04-07 15:10:36 +01:00
bors 8c2d7b2da3 Auto merge of #49661 - alexcrichton:bump-bootstrap, r=nikomatsakis
Bump the bootstrap compiler to 1.26.0 beta

Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language
features!
2018-04-07 11:58:38 +00:00
Tatsuyuki Ishi 4c51d47269
bootstrap: Remove the fast path
This is rarely noticed, but when you have old submodules, not updating them will cause you run into https://github.com/rust-lang/cargo/issues/4678.
2018-04-06 16:23:53 +09:00
Alex Crichton 8958815916 Bump the bootstrap compiler to 1.26.0 beta
Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language
features!
2018-04-05 07:13:45 -07:00
kennytm 84f6440d79
Rollup merge of #49654 - davidtwco:issue-29893, r=alexcrichton
Host compiler documentation: Include private items

Fixes #29893. Now that compiler documentation is being hosted, including private items seems sensible as these types are going to be being used by contributors working on the compiler.

However, including this means that doc comments that contain codeblocks with invalid Rust and can fail the documenting of a given crate (as evidenced by the changes in the second commit included in this PR). We'd need some way of ensuring that this cannot happen so that these failures don't cause documenting to fail. I'm unsure whether this change to documentation steps will cause this to happen already or if something new will be required.

r? @alexcrichton
2018-04-05 18:37:28 +08:00
kennytm b146e33518
Rollup merge of #49563 - japaric:std-thumb, r=alexcrichton
add a dist builder to build rust-std components for the THUMB targets

the rust-std component only contains the core and compiler-builtins (+c +mem) crates

cc #49382

- I'm not entirely sure if this PR alone will produce rust-std components installable by rustup or if something else needs to be changed
- I could have done the THUMB builds in an existing builder / image; I wasn't sure if that was a good idea so I added a new image
- I could build other crates like alloc into the rust-std component but, AFAICT, that would require calling Cargo a second time (one for alloc and one for compiler-builtins), or have alloc depend on compiler-builtins (#49503 will perform that change) *and* have alloc resurface the "c" and "mem" Cargo features.

r? @alexcrichton
2018-04-05 18:37:25 +08:00
Jorge Aparicio b1015f5c5a compile other no-std crates 2018-04-04 22:42:56 +02:00
Jorge Aparicio bca569f57c Revert "create a nostd crate"
This reverts commit 14768f9b63.
2018-04-04 22:23:33 +02:00
Jorge Aparicio 14768f9b63 create a nostd crate
the goal is to build, in a single Cargo invocation, several no-std crates that we want to put in the
rust-std component of no-std targets. The nostd crate builds these crates:

- core
- compiler-builtin (with the "c" and "mem" features enabled)
- alloc
- std_unicode
2018-04-04 19:24:57 +02:00
David Wood 9e9a987a02
Documenting private items in compiler docs. 2018-04-04 16:09:01 +01:00
Mark Simulacrum 184d3bca6c Stop checking that the graph produced by a dry run is equivalent
This is too likely to cause spurious bounces on CI; what we run may be
dependent on what ran successfully before hand (e.g. RLS features with
Clippy), which makes this not tenable. There's no good way to ignore
specifically these problematic steps so we'll just ignore everything for
the time being. We still test that a dry run worked though so largely
this is the same from a ensure-that-tests-work perspective.

Eventually we'll want to undo this commit, though, to make our tests
more accurate.
2018-04-03 11:43:14 -06:00
Mark Simulacrum 0ce5cf0697 Fix a few accidental expectations 2018-04-03 11:43:14 -06:00
Mark Simulacrum 545b92f46d Avoid printing output when in dry run mode 2018-04-03 11:43:14 -06:00
Mark Simulacrum a727447f59 Refactor to use a dry-run config instead of cfg(test)
This ensures that each build will support the testing design of "dry
running" builds. It's also checked that a dry run build is equivalent
step-wise to a "wet" run build; the graphs we generate when running are
directly compared node/node and edge/edge, both for order and contents.
2018-04-03 11:43:14 -06:00
Mark Simulacrum b0dbc7c15d Implement generating graphs of the build steps 2018-04-03 11:43:12 -06:00
Mark Simulacrum f4620a3d14 Stub out less code 2018-04-03 11:41:51 -06:00
Mark Simulacrum 42fde21c27 Add tests to rustbuild
In order to run tests, previous commits have cfg'd out various parts of
rustbuild. Generally speaking, these are filesystem-related operations
and process-spawning related parts. Then, rustbuild is run "as normal"
and the various steps that where run are retrieved from the cache and
checked against the expected results.

Note that this means that the current implementation primarily tests
"what" we build, but doesn't actually test that what we build *will*
build. In other words, it doesn't do any form of dependency verification
for any crate. This is possible to implement, but is considered future
work.

This implementation strives to cfg out as little code as possible; it
also does not currently test anywhere near all of rustbuild. The current
tests are also not checked for "correctness," rather, they simply
represent what we do as of this commit, which may be wrong.

Test cases are drawn from the old implementation of rustbuild, though
the expected results may vary.
2018-04-03 11:41:50 -06:00
Mark Simulacrum 8fd42ec130 Extract default Config into function
Will permit creating Config in tests without having to parse a toml
file.
2018-04-03 11:39:16 -06:00
Mark Simulacrum fde70b0963 Make test steps sortable
Ensures that test cases will be somewhat easier to write.
2018-04-03 11:39:16 -06:00
Mark Simulacrum cd33d3a0e4 Stub out various functions during testing 2018-04-03 11:39:16 -06:00
Mark Simulacrum e7342b8f42 Permit constructing Build without executing 2018-04-03 11:39:16 -06:00
Mark Simulacrum a5e56b62c5 Permit constructing Builder without executing 2018-04-03 11:39:16 -06:00
Mark Simulacrum 84b5b34021 Stop accessing current_dir in bootstrap
This ensures that the working directory of rustbuild has no effect on
it's run; since tests will run with a different cwd this is required for
consistent behavior.
2018-04-03 11:39:15 -06:00
Jorge Aparicio 862c839fb9 extend no-std-ness check to all *-none-* targets 2018-04-03 08:29:09 +02:00
Alex Crichton e9d898318c Bump to 1.27.0
Also update some `Cargo.lock` dependencies, finishing up some final steps of our
[release process]!

This doesn't update the bootstrap compiler just yet but that will come in a
follow-up PR.

[release process]: https://forge.rust-lang.org/release-process.html
2018-04-02 12:42:44 -07:00
Jorge Aparicio 68b54a5f43 add a dist-thumb builder to build rust-std for the THUMB targets
the rust-std component only contains the core and compiler-builtins (+c +mem) crates

cc #49382
2018-04-01 18:50:21 +02:00
Mark Simulacrum 36f9f76356
Rollup merge of #49549 - Mark-Simulacrum:bootstrap-cleanup, r=alexcrichton
Remove filetime dep from build_helper

r? @alexcrichton
2018-04-01 18:04:57 +02:00
Mark Simulacrum 86915ddf30 Remove filetime dep from build_helper 2018-04-01 04:49:21 -06:00
bors 804d8c88d9 Auto merge of #49530 - petrhosek:empty-extra-flags, r=cramertj
Only include space in RUSTFLAGS extra flags if not empty

When the RUSTFLAGS_STAGE_{1,2} is not set, including a space means
the string will always be non-empty and RUSTFLAGS will be always be
reset which breaks other ways of setting these such as through config
in CARGO_HOME.
2018-04-01 05:09:48 +00:00
Petr Hosek c6bae16dc2 Only include space in RUSTFLAGS extra flags if not empty
When the RUSTFLAGS_STAGE_{1,2} is not set, including a space means
the string will always be non-empty and RUSTFLAGS will be always be
reset which breaks other ways of setting these such as through config
in CARGO_HOME.
2018-03-30 19:37:08 -07:00
Petr Hosek a24811e15a Handle fast-submodules option correctly
This option was introduced in 72cb109bec, but it uses two different
spellings (fast-submodule vs fast-submodules) and isn't handled by
Rust bootstrap which means that any attempt to set this flag fails.
2018-03-30 16:42:57 -07:00
Oliver Middleton e719bb048e Add docs for the test crate with the std docs
If the compiler docs aren't going to include the test crate then it may as well be included with std.
2018-03-28 22:49:56 +01:00
Oliver Middleton 77c70a8c47 rustbuild: Don't leak file handles when creating junctions on Windows
This fixes building the compiler docs because stage1-rustc\x86_64-pc-windows-msvc\doc is used twice which
doesn't work if we still have a handle from the first time.
2018-03-28 22:43:23 +01:00
Alex Crichton faebcc1087 rustbuild: Fail the build if we build Cargo twice
This commit updates the `ToolBuild` step to stream Cargo's JSON messages, parse
them, and record all libraries built. If we build anything twice (aka Cargo)
it'll most likely happen due to dependencies being recompiled which is caught by
this check.
2018-03-26 13:07:12 -07:00
Alex Crichton bd28641344 rustbuild: Disable docs on cross-compiled builds
This commit disables building documentation on cross-compiled compilers, for
example ARM/MIPS/PowerPC/etc. Currently I believe we're not getting much use out
of these documentation artifacts and they often take 10-15 minutes total to
build as it requires building rustdoc/rustbook and then also generating all the
documentation, especially for the reference and the book itself.

In an effort to cut down on the amount of work that we're doing on dist CI
builders in light of recent timeouts this was some relatively low hanging fruit
to cut which in theory won't have much impact on the ecosystem in the hopes that
the documentation isn't used too heavily anyway.

While initial analysis in #48827 showed only shaving 5 minutes off local builds
the same 5 minute conclusion was drawn from #48826 which ended up having nearly
a half-hour impact on the bots. In that sense I'm hoping that we can land this
and test out what happens on CI to see how it affects timing.

Note that all tier 1 platforms, Windows, Mac, and Linux, will continue to
generate documentation.
2018-03-25 23:31:41 -07:00
bors 445fafaa4b Auto merge of #49341 - alexcrichton:more-balance, r=kennytm
appveyor: Move run-pass-fulldeps to extra builders

We've made headway towards splitting the test suite across two appveyor builders
and this moves one more tests suite between builders. The last [failed
build][fail] had its longest running test suite and I've moved that to the
secondary builder.

cc #48844

[fail]: https://ci.appveyor.com/project/rust-lang/rust/build/1.0.6782
2018-03-26 02:39:28 +00:00
Alex Crichton 796c78a353 appveyor: Move run-pass-fulldeps to extra builders
We've made headway towards splitting the test suite across two appveyor builders
and this moves one more tests suite between builders. The last [failed
build][fail] had its longest running test suite and I've moved that to the
secondary builder.

cc #48844

[fail]: https://ci.appveyor.com/project/rust-lang/rust/build/1.0.6782
2018-03-24 13:46:57 -07:00
kennytm 177e20de32
Rollup merge of #49290 - cuviper:unextended-dist-rustfmt, r=nikomatsakis
Allow installing rustfmt without config.extended

This assertion was preventing `./x.py install rustfmt` if attempted
without an "extended" build configuration, but it actually builds and
installs just fine.
2018-03-25 01:26:44 +08:00
kennytm 311814a1a9
Rollup merge of #49193 - davidtwco:issue-29893, r=alexcrichton
Host compiler documentation

Fixes #29893. Rust Central Station PR: rust-lang/rust-central-station#40

r? @alexcrichton
2018-03-25 01:26:33 +08:00
kennytm c5264a5932
Rollup merge of #49120 - Zoxc:parallel-ci, r=alexcrichton
Add a CI job for parallel rustc using x.py check

r? @alexcrichton
2018-03-25 01:26:28 +08:00
kennytm 23b4bf924f
Rollup merge of #49089 - alexcrichton:fix-timings, r=Mark-Simulacrum
rustbuild: Tweak where timing information goes

This commit tweaks where timing and step information is printed out as part of
the build, ensuring that we do it as close to the location where work happens as
possible. In rustbuild various functions may perform long blocking work as
dependencies are assembled, so if we print out timing information early on we
may accidentally time more than just the step we were intending to time!
2018-03-25 01:26:27 +08:00
bors 4be5d360cd Auto merge of #49311 - SimonSapin:bootstrap-vs-rustflags-the-return, r=Mark-Simulacrum
Use the same RUSTFLAGS for building and testing `bootstrap`

This avoids recompiling the whole dependency graph twice for every `./x.py test` run.

Fixes #49215
2018-03-23 23:08:13 +00:00
Simon Sapin e993e62341 Use the same RUSTFLAGS for building and testing `bootstrap`
Fixes #49215
2018-03-23 19:55:41 +01:00
Josh Stone 86f7d8939d Allow installing rustfmt without config.extended
This assertion was preventing `./x.py install rustfmt` if attempted
without an "extended" build configuration, but it actually builds and
installs just fine.
2018-03-22 18:31:32 -07:00
David Wood 73fa6d52ed
Remove std/test documentation from compiler docs. 2018-03-22 20:49:05 +00:00
Alex Crichton 7df6f4161c rustc: Add a `#[wasm_custom_section]` attribute
This commit is an implementation of adding custom sections to wasm artifacts in
rustc. The intention here is to expose the ability of the wasm binary format to
contain custom sections with arbitrary user-defined data. Currently neither our
version of LLVM nor LLD supports this so the implementation is currently custom
to rustc itself.

The implementation here is to attach a `#[wasm_custom_section = "foo"]`
attribute to any `const` which has a type like `[u8; N]`. Other types of
constants aren't supported yet but may be added one day! This should hopefully
be enough to get off the ground with *some* custom section support.

The current semantics are that any constant tagged with `#[wasm_custom_section]`
section will be *appended* to the corresponding section in the final output wasm
artifact (and this affects dependencies linked in as well, not just the final
crate). This means that whatever is interpreting the contents must be able to
interpret binary-concatenated sections (or each constant needs to be in its own
custom section).

To test this change the existing `run-make` test suite was moved to a
`run-make-fulldeps` folder and a new `run-make` test suite was added which
applies to all targets by default. This test suite currently only has one test
which only runs for the wasm target (using a node.js script to use `WebAssembly`
in JS to parse the wasm output).
2018-03-22 13:16:38 -07:00
David Wood 1b0e9f5af9
Only generate documentation for local rustc crates. 2018-03-22 17:21:30 +00:00
bors 5092c6b01a Auto merge of #49264 - kennytm:rollup, r=kennytm
Rollup of 23 pull requests

- Successful merges: #48374, #48596, #48759, #48939, #49029, #49069, #49093, #49109, #49117, #49140, #49158, #49188, #49189, #49209, #49211, #49216, #49225, #49231, #49234, #49242, #49244, #49105, #49038
- Failed merges:
2018-03-22 16:58:57 +00:00
kennytm 34eca5346f
Rollup merge of #49209 - Zoxc:run-make-last, r=Mark-Simulacrum
Run the `run-make` tests last, so more tests run on Windows when `make` is unavailable

Just https://github.com/rust-lang/rust/pull/47996 again.

r? @Mark-Simulacrum
2018-03-22 22:43:45 +08:00
bors b176285ba7 Auto merge of #49094 - alexcrichton:print-step-duration, r=kennytm
ci: Print out how long each step takes on CI

This commit updates CI configuration to inform rustbuild that it should print
out how long each step takes on CI. This'll hopefully allow us to track the
duration of steps over time and follow regressions a bit more closesly (as well
as have closer analysis of differences between two builds).

cc #48829
2018-03-22 09:46:06 +00:00
David Wood 178652a298
Add support to rustbuild for a 'rustc docs' component tarball 2018-03-21 19:02:53 +00:00
John Kåre Alsaker 859640a3ca Run the `run-make` tests last, so more tests run on Windows when `make` is unavailable 2018-03-20 15:33:22 +01:00
Alex Crichton 1b5eb17d61 ci: Print out how long each step takes on CI
This commit updates CI configuration to inform rustbuild that it should print
out how long each step takes on CI. This'll hopefully allow us to track the
duration of steps over time and follow regressions a bit more closesly (as well
as have closer analysis of differences between two builds).

cc #48829
2018-03-20 07:17:37 -07:00
John Kåre Alsaker efa9016390 Add a CI job for parallel rustc using x.py check 2018-03-18 17:04:50 +01:00
Maxim Nazarenko 1e73c1d39f rustbuild: Ship libsynchronization
Ship libsynchronization from MinGW
2018-03-18 03:05:00 +02:00
Alex Crichton 6fd4d67819 rustbuild: Tweak where timing information goes
This commit tweaks where timing and step information is printed out as part of
the build, ensuring that we do it as close to the location where work happens as
possible. In rustbuild various functions may perform long blocking work as
dependencies are assembled, so if we print out timing information early on we
may accidentally time more than just the step we were intending to time!
2018-03-17 10:59:41 -07:00
kennytm c78426bfc8
Rollup merge of #49057 - Zoxc:fast-submodules, r=alexcrichton
Faster submodule updating

For the common case when there are no submodules which need updating, this takes 0.48 seconds instead of 47 seconds.

r? @alexcrichton
2018-03-17 17:20:46 +08:00
kennytm a2289dadb0
Rollup merge of #49055 - alexcrichton:ship-more-libs, r=nikomatsakis
rustbuild: Add more MinGW libraries to ship

Closes #49044
2018-03-17 17:20:44 +08:00
kennytm 2a7dac05e7
Rollup merge of #48943 - comex:verbose, r=kennytm
Support extra-verbose builds

- The bootstrap crate currently passes -v to Cargo if itself invoked with -vv.  But Cargo supports -vv (to show build script output), so make bootstrap pass that if itself invoked with -vvv.  (More specifically, pass N '-v's to Cargo if invoked with N+1 of them.)

- bootstrap.py currently tries to pass on up to two '-v's to cargo when building bootstrap, but incorrectly ('-v' is marked as 'store_true', so argparse stores either False or True, ignoring multiple '-v's).  Fix this, allow passing any number of '-v's, and make it consistent with bootstrap's invocation of Cargo (i.e. subtract one from the number of '-v's).

- Also improve bootstrap.py's config.toml 'parsing' to support arbitrary verbosity levels, + allow command line to override it.
2018-03-17 17:20:41 +08:00
bors 8cabda4ce8 Auto merge of #49090 - QuietMisdreavus:test-rustdoc-again, r=Mark-Simulacrum
re-enable testing librustdoc

This was originally put in in https://github.com/rust-lang/rust/pull/44274, but https://github.com/rust-lang/rust/pull/48105 accidentally hid it. This change puts librustdoc unit/doc tests back in the main test listing.

fixes https://github.com/rust-lang/rust/issues/44237 (again)
2018-03-17 03:15:21 +00:00
Oliver Schneider 02ac15cb89
Automatically enable the `clippy` feature of `rls` if clippy builds 2018-03-16 18:24:08 +01:00
QuietMisdreavus bda584386e re-enable resting librustdoc 2018-03-16 11:38:06 -05:00
Alex Crichton 3304c76874 rustbuild: Add more MinGW libraries to ship
Closes #49044
2018-03-16 07:32:41 -07:00
bors 3b6412b943 Auto merge of #48896 - alexcrichton:bitcode-in-object, r=michaelwoerister
rustc: Enable embedding LLVM bitcode for iOS

This commit updates rustc to embed bitcode in each object file generated by
default when compiling for iOS. This was determined in #35968 as a step
towards better compatibility with the iOS toolchain, so let's give it a spin and
see how it turns out!

Note that this also updates the `cc` dependency which should propagate this
change of embedding bitcode for C dependencies as well.
2018-03-16 13:48:20 +00:00
comex ec49234f44 Support extra-verbose builds:
- The bootstrap crate currently passes -v to Cargo if itself invoked
with -vv.  But Cargo supports -vv (to show build script output), so make
bootstrap pass that if itself invoked with -vvv.  (More specifically,
pass N '-v's to Cargo if invoked with N+1 of them.)

- bootstrap.py currently tries to pass on up to two '-v's to cargo when
building bootstrap, but incorrectly ('-v' is marked as 'store_true', so
argparse stores either False or True, ignoring multiple '-v's).  Fix
this, allow passing any number of '-v's, and make it consistent with
bootstrap's invocation of Cargo (i.e. subtract one from the number of
'-v's).

- Also improve bootstrap.py's config.toml 'parsing' to support arbitrary
verbosity levels, + allow command line to override it.
2018-03-15 17:17:10 -07:00
John Kåre Alsaker 72cb109bec Faster submodule updating 2018-03-15 21:12:25 +01:00
kennytm 68a602efa9
Rollup merge of #48892 - alexcrichton:thinlto-again, r=Mark-Simulacrum
rustbuild: Remove ThinLTO-related configuration

This commit removes some ThinLTO/codegen unit cruft primarily only needed during
the initial phase where we were adding ThinLTO support to rustc itself. The
current bootstrap compiler knows about ThinLTO and has it enabled by default for
multi-CGU builds which are also enabled by default. One CGU builds (aka
disabling ThinLTO) can be achieved by configuring the number of codegen units to
1 for a particular builds.

This also changes the defaults for our dist builders to go back to multiple
CGUs. Unfortunately we're seriously bleeding for cycle time on the bots right
now so we need to recover any time we can.
2018-03-16 01:49:41 +08:00
Alex Crichton 1999a3fb41 rustbuild: Tweak CFLAGS to various libstd pieces
* Pass `opt_level(2)` when calculating CFLAGS to get the right flags on iOS
* Unconditionally pass `-O2` when compiling libbacktrace

This should...

Close #48903
Close #48906
2018-03-13 08:28:27 -07:00
bors 222b0eb583 Auto merge of #48295 - Keruspe:master, r=alexcrichton
rustbuild: pass datadir to rust-installer

This fixes zsh completion install when $datadir != $prefix/share
2018-03-12 08:11:19 +00:00
bors 178becdd7c Auto merge of #48549 - alexcrichton:update-cargo, r=Mark-Simulacrum
Update Cargo submodule

Hopefully a routine update...
2018-03-11 20:28:34 +00:00
Alex Crichton 994bfd4141 Update Cargo submodule
Required moving all fulldeps tests depending on `rand` to different locations as
now there's multiple `rand` crates that can't be implicitly linked against.
2018-03-11 10:59:28 -07:00
bors 6c70cd149d Auto merge of #48599 - Mark-Simulacrum:rustbuild-updates-step-1, r=alexcrichton
Remove ONLY_BUILD and ONLY_BUILD_TARGETS

Primarily removes `ONLY_BUILD` and `ONLY_BUILD_TARGETS`. These aren't actually needed in the new system since we can simply not take the relevant `host` and `target` fields if we don't want to run with them in `Step::make_run`.

This PR also includes a few other commits which generally clean up the state of rustbuild, but are not related to the `Step` changes.
2018-03-11 17:54:18 +00:00
Alex Crichton 30437237a8 rustbuild: Pass `-j1` to OpenSSL `make install`
We explicitly do this when compiling OpenSSL itself due to weird racy issues in
its build system, and now we've started seeing issues in the `make install` step
so let's try and see what ratcheting down the parallelism does here...
2018-03-09 18:49:28 -08:00
bors 89115c098f Auto merge of #48891 - alexcrichton:dist-osx-9.3, r=kennytm
travis: Upgrade dist builders for OSX

This commit upgrades the dist builders for OSX to Travis's new `xcode9.3-moar`
image which has 3 cores available to it instead of 2. This should help us
provide speedier builds on OSX and hit timeouts less in theory!

Note that historically the dist builders for OSX have been a different version
than the ones that are running tests. I had forgotten why this was the case and
digging around brought up 307615567 where apparently Xcode 8 wasn't able to
compile LLVM with `MACOSX_DEPLOYMENT_TARGET=10.7` which we desired. On a whim I
gave this PR a spin and it [looks like][green] this has since been fixed (maybe
in LLVM?). In any case those green builds should hopefully mean that we can
safely upgrade and get faster infrastructure to boot.

This commit also includes an upgrade of OpenSSL. This is not done for security
reasons but rather build system reasons. Originally builds with the new image
[did not succeed][red] due to weird build failures in OpenSSL, but upgrading
seems to have made the spurious errors go away to here's to also hoping that's
fixed!

[green]: https://travis-ci.org/rust-lang/rust/builds/351353412
[red]: https://travis-ci.org/rust-lang/rust/builds/350969248
2018-03-09 21:46:58 +00:00
Alex Crichton ff227c4a2d rustbuild: Remove ThinLTO-related configuration
This commit removes some ThinLTO/codegen unit cruft primarily only needed during
the initial phase where we were adding ThinLTO support to rustc itself. The
current bootstrap compiler knows about ThinLTO and has it enabled by default for
multi-CGU builds which are also enabled by default. One CGU builds (aka
disabling ThinLTO) can be achieved by configuring the number of codegen units to
1 for a particular builds.

This also changes the defaults for our dist builders to go back to multiple
CGUs. Unfortunately we're seriously bleeding for cycle time on the bots right
now so we need to recover any time we can.
2018-03-09 13:21:37 -08:00
Alex Crichton d65dfd13ec travis: Upgrade dist builders for OSX
This commit upgrades the dist builders for OSX to Travis's new `xcode9.3-moar`
image which has 3 cores available to it instead of 2. This should help us
provide speedier builds on OSX and hit timeouts less in theory!

Note that historically the dist builders for OSX have been a different version
than the ones that are running tests. I had forgotten why this was the case and
digging around brought up 307615567 where apparently Xcode 8 wasn't able to
compile LLVM with `MACOSX_DEPLOYMENT_TARGET=10.7` which we desired. On a whim I
gave this PR a spin and it [looks like][green] this has since been fixed (maybe
in LLVM?). In any case those green builds should hopefully mean that we can
safely upgrade and get faster infrastructure to boot.

This commit also includes an upgrade of OpenSSL. This is not done for security
reasons but rather build system reasons. Originally builds with the new image
[did not succeed][red] due to weird build failures in OpenSSL, but upgrading
seems to have made the spurious errors go away to here's to also hoping that's
fixed!

[green]: https://travis-ci.org/rust-lang/rust/builds/351353412
[red]: https://travis-ci.org/rust-lang/rust/builds/350969248
2018-03-09 13:03:13 -08:00
Alex Crichton be902e7168 rustbuild: Fix MSBuild location of `llvm-config.exe`
For LLD integration the path to `llvm-config` needed to change to inside the
build directory itself (for whatever reason) but the build directory is
different on MSBuild than it is on `ninja` for MSVC builds, so the path to
`llvm-config.exe` was actually wrong and not working!

This commit removes the `Build::llvm_config` function in favor of the source of
truth, the `Llvm` build step itself. The build step was then updated to find the
right build directory for MSBuild as well as `ninja` for where `llvm-config.exe`
is located.

Closes #48749
2018-03-09 07:29:08 -08:00
Mark Simulacrum 29a852970b Refactor run_host_only to have the proper effect.
Previously it was set to true when we didn't run HOSTS steps.
2018-03-08 20:30:00 -07:00
Mark Simulacrum 9cfc73cd3f Deny warnings 2018-03-08 20:30:00 -07:00
Mark Simulacrum c8edb36520 Print out the sysroot and libdir on verbose builds. 2018-03-08 20:30:00 -07:00
Mark Simulacrum 1c8f3b011c Remove ONLY_BUILD.
All uses are replaced with not accessing run.target/run.host, and
instead directly using run.builder.build.build.
2018-03-08 20:30:00 -07:00
Mark Simulacrum 1191510881 Remove ONLY_BUILD_TARGETS.
All cases where it is used can be replaced by substituing run.host for
run.builder.build.build; that is its only effect. As such, it is
removable.
2018-03-08 20:30:00 -07:00
Marc-Antoine Perennou d14f07e089 bootstrap: pass datadir to rust-installer
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2018-03-08 07:47:21 +01:00
Alex Crichton 893e499e86 appveyor: Fix a switched condition for cargotest
It was intended that EXCLUDE_CARGO *doesn't* run cargotest!
2018-03-07 17:00:27 -08:00
Alex Crichton 16cc9ce8a2 Fix an error in the appveyor config 2018-03-07 13:57:17 -08:00
Alex Crichton 7f465abd4f appveyor: Shard more slow MSVC builders
Take two more slow builders and split them in two to get them under 2 hrs
2018-03-07 07:29:44 -08:00
Mark Mansi b9b1c378c5 Get the path to cargo from rustbuild 2018-03-05 14:43:44 -06:00
Alex Crichton 2f2ac9ac47 Include stdsimd in rust-src component
Closes #48734
2018-03-04 12:13:21 -08:00
bors 4a316e7483 Auto merge of #48630 - alexcrichton:more-sccache, r=kennytm
rustbuild: Pass `ccache` to build scripts

This is a re-attempt at #48192 hopefully this time with 100% less randomly
[blocking builds for 20 minutes][block]. To work around #48192 the sccache
server is started in the `run.sh` script very early on in the compilation
process.

[block]: https://github.com/rust-lang/rust/issues/48192
2018-03-04 07:09:41 +00:00
Alex Crichton 0129b01a41 rustc: Tweak default linker selection
This commit refactors how the path to the linker that we're going to invoke is
selected. Previously all targets listed *both* a `LinkerFlavor` and a `linker`
(path) option, but this meant that whenever you changed one you had to change
the other. The purpose of this commit is to avoid coupling these where possible.

Target specifications now only unconditionally define the *flavor* of the linker
that they're using by default. If not otherwise specified each flavor now
implies a particular default linker to run. As a result, this means that if
you'd like to test out `ld` for example you should be able to do:

    rustc -Z linker-flavor=ld foo.rs

whereas previously you had to do

    rustc -Z linker-flavor=ld -C linker=ld foo.rs

This will hopefully make it a bit easier to tinker around with variants that
should otherwise be well known to work, for example with LLD, `ld` on OSX, etc.
2018-03-03 20:21:35 -08:00
Alex Crichton d69b24805b rust: Import LLD for linking wasm objects
This commit imports the LLD project from LLVM to serve as the default linker for
the `wasm32-unknown-unknown` target. The `binaryen` submoule is consequently
removed along with "binaryen linker" support in rustc.

Moving to LLD brings with it a number of benefits for wasm code:

* LLD is itself an actual linker, so there's no need to compile all wasm code
  with LTO any more. As a result builds should be *much* speedier as LTO is no
  longer forcibly enabled for all builds of the wasm target.
* LLD is quickly becoming an "official solution" for linking wasm code together.
  This, I believe at least, is intended to be the main supported linker for
  native code and wasm moving forward. Picking up support early on should help
  ensure that we can help LLD identify bugs and otherwise prove that it works
  great for all our use cases!
* Improvements to the wasm toolchain are currently primarily focused around LLVM
  and LLD (from what I can tell at least), so it's in general much better to be
  on this bandwagon for bugfixes and new features.
* Historical "hacks" like `wasm-gc` will soon no longer be necessary, LLD
  will [natively implement][gc] `--gc-sections` (better than `wasm-gc`!) which
  means a postprocessor is no longer needed to show off Rust's "small wasm
  binary size".

LLD is added in a pretty standard way to rustc right now. A new rustbuild target
was defined for building LLD, and this is executed when a compiler's sysroot is
being assembled. LLD is compiled against the LLVM that we've got in tree, which
means we're currently on the `release_60` branch, but this may get upgraded in
the near future!

LLD is placed into rustc's sysroot in a `bin` directory. This is similar to
where `gcc.exe` can be found on Windows. This directory is automatically added
to `PATH` whenever rustc executes the linker, allowing us to define a `WasmLd`
linker which implements the interface that `wasm-ld`, LLD's frontend, expects.

Like Emscripten the LLD target is currently only enabled for Tier 1 platforms,
notably OSX/Windows/Linux, and will need to be installed manually for compiling
to wasm on other platforms. LLD is by default turned off in rustbuild, and
requires a `config.toml` option to be enabled to turn it on.

Finally the unstable `#![wasm_import_memory]` attribute was also removed as LLD
has a native option for controlling this.

[gc]: https://reviews.llvm.org/D42511
2018-03-03 20:21:35 -08:00
kennytm ea354b6a01
Rollup merge of #48664 - Keruspe:codegen, r=alexcrichton
make codegen-backends directory name configurable

This allows to parallel-install several versions of rust system-wide
Fixes #48263
2018-03-04 02:18:25 +08:00
kennytm e71c96fab9
Rollup merge of #48680 - steveklabnik:no-toc, r=nikomatsakis
Don't produce TOCs for doc markdown files

Currently, we are producing headers for markdown files,
which is generally not what we want. As such, passing this
flag causes them to render normally.

https://doc.rust-lang.org/nightly/book/ is an example page currently where this is done incorrectly.
2018-03-04 02:17:36 +08:00
kennytm fb411d86c6
Rollup merge of #48637 - segevfiner:restore-rust-mingw-download, r=alexcrichton
Restore the download of rust-mingw

The build might otherwise break due to mixing MinGW object files from rust-std and the local MinGW which might be newer/older than the version used to build rust-std.

Fixes #48272

r? @alexcrichton
2018-03-03 18:45:47 +08:00
kennytm 14b6262fde
Rollup merge of #48569 - Phlosioneer:x-py-help-optimization, r=petrochenkov
Improve --help performance for x.py

Since compiling the bootstrap command doesn't require any submodules,
we can skip updating submodules when a --help command is passed in.
On my machine, this saves 1 minute if the submodules are already
downloaded, and 10 minutes if run on a clean repo.

This commit also adds a message before compiling/downloading anything
when a --help command is passed in, to tell the user WHY --help
takes so long to complete. It also points the user to the bootstrap
README.md for faster help.

Finally, this fixes one warning message that still referenced using
make instead of x.py, even though x.py is now the standard way of
building rust.

Closes #37305
2018-03-03 18:45:45 +08:00
steveklabnik 900d511fdc Don't produce TOCs for doc markdown files
Currently, we are producing headers for markdown files,
which is generally not what we want. As such, passing this
flag causes them to render normally.
2018-03-02 13:52:13 -05:00
Marc-Antoine Perennou 6250a47ea6 make codegen-backends directory name configurable
This allows to parallel-install several versions of rust system-wide
Fixes #48263

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2018-03-02 13:51:02 +01:00
Phlosioneer 2269ff521f Remove print_what_bootstrap_means
It was an existing solution to tell the user why a --help command
takes a long time to process. However, it would only print if the
stage0 rust compiler needed to be downloaded, it came after
update_submodules (which took a long time), and it was immediately
followed by download messages and loading bars, meaning users could
easily gloss over the message.

This commit also moves the help message out of main(), and instead
puts it at the top of bootstrap(). main() is intended to be minimal,
only handling error messages.
2018-03-02 03:29:35 -05:00
Alex Crichton fdef6a881e rustbuild: Pass `ccache` to build scripts
This is a re-attempt at #48192 hopefully this time with 100% less randomly
[blocking builds for 20 minutes][block]. To work around #48192 the sccache
server is started in the `run.sh` script very early on in the compilation
process.

[block]: https://github.com/rust-lang/rust/issues/48192
2018-03-01 21:53:46 -08:00
Manish Goregaokar eadea4ab1a Rollup merge of #48405 - kennytm:autotoolstate-follow-up, r=Mark-Simulacrum
Auto-toolstate management follow-up.

Tracking comment: https://github.com/rust-lang/rust/issues/45861#issuecomment-367302777

* Fixed rust-lang-nursery/rust-toolstate#1, a proper link to the PR will be included.
* Fixed rust-lang-nursery/rust-toolstate#2, a comment will be posted to the PR if the toolstate changed
* Toolstate regression will be rejected at the last week of the 6-week cycle (currently entirely date-based).
* Implemented https://internals.rust-lang.org/t/the-current-submodule-setup-is-not-tenable/6593, moved doc tests of Nomicon, Reference, Rust-by-Example and The Book to the "tools" job and thus allowed to fail like other external tools.
2018-03-01 09:29:37 -08:00
Segev Finer 5332d9a8e8 Document why we download rust-mingw 2018-03-01 18:33:14 +02:00
Segev Finer 39d0b054ce Restore the download of rust-mingw
The build might otherwise break due to mixing MinGW object files from
rust-std and the local MinGW which might be newer/older than the version
used to build rust-std.

Fixes #48272
2018-03-01 15:20:07 +02:00
kennytm 4b4cd47021
Rollup merge of #48558 - Mark-Simulacrum:error-format, r=Manishearth
Fix error-format to properly send JSON to stdout

Since we take Cargo's JSON messages as well we need to specifically send
rustc's messages out so we don't hide them.

r? @Manishearth
2018-02-28 19:15:41 +08:00
Phlosioneer ffb6291cd0 Improve --help performance for x.py
Since compiling the bootstrap command doesn't require any submodules,
we can skip updating submodules when a --help command is passed in.
On my machine, this saves 1 minute if the submodules are already
downloaded, and 10 minutes if run on a clean repo.

This commit also adds a message before compiling/downloading anything
when a --help command is passed in, to tell the user WHY --help
takes so long to complete. It also points the user to the bootstrap
README.md for faster help.

Finally, this fixes one warning message that still referenced using
make instead of x.py, even though x.py is now the standard way of
building rust.
2018-02-26 20:45:52 -05:00
Mark Simulacrum 9c80019e6c Fix error-format argument to x.py 2018-02-26 15:07:24 -07:00
John Paul Adrian Glaubitz 88de279dca bootstrap: Add openssl configuration for powerpc-unknown-linux-gnuspe 2018-02-26 02:07:24 +01:00
kennytm eb0ab5e6b2
Rollup merge of #48517 - penpalperson:master, r=Mark-Simulacrum
Added error-format flag to x.py.

Fixes #48475

r? @Mark-Simulacrum
2018-02-25 21:30:51 +08:00
kennytm 266386a10e
Rollup merge of #48489 - glaubitz:x32-linux, r=alexcrichton
bootstrap: Add openssl configuration for x86_64-unknown-linux-gnux32

OpenSSL provides a native configuration for x86_64-unknown-linux-gnux32:

> https://github.com/openssl/openssl/blob/master/Configurations/10-main.conf#L810

Let's use it.
2018-02-25 21:30:47 +08:00
kennytm f28931f767
Rollup merge of #48362 - cuviper:libdir_relative, r=Mark-Simulacrum
rustbuild: Restore Config.libdir_relative

This re-introduces a `Config.libdir_relative` field, now derived from
`libdir` and made relative to `prefix` if necessary.

This fixes a regression from #46592 when `--libdir` is given an absolute
path.  `Builder::sysroot_libdir` should always use a relative path so
its callers don't clobber system locations, and `librustc` also asserts
that `CFG_LIBDIR_RELATIVE` is really relative.
2018-02-25 21:30:44 +08:00
kennytm b571155631
Rollup merge of #48297 - glaubitz:sparc-linux, r=estebank
Add missing pieces for sparc-linux-gnu support

I noticed that while Rust has CABI support for 32-bit SPARC, there are still some pieces missing to be able to use Rust on a 32-Bit SPARC system like Gentoo which still defaults to a 32-bit port unlike Debian's sparc64 port.

This PR is an attempt to add the missing pieces. I will send the necessary changes for libc in a separate PR.

CC @jrtc27
2018-02-25 15:54:45 +08:00
kennytm 3e2072e51d
Rollup merge of #48281 - jakllsch:netbsd-powerpc, r=alexcrichton
Add powerpc-unknown-netbsd target
2018-02-25 15:54:44 +08:00
penpalperson 264a92182e Added error-format flag to x.py. 2018-02-24 15:56:33 -07:00
Vadim Petrochenkov aafebbcba9 Remove directory `src/rt` 2018-02-24 16:45:39 +03:00
John Paul Adrian Glaubitz 0b6583ed97 bootstrap: Add openssl configuration for x86_64-unknown-linux-gnux32 2018-02-24 01:08:02 +01:00
kennytm a9f940e320
Run the external doc tests in tools job. 2018-02-24 00:54:13 +08:00
John Paul Adrian Glaubitz 871e82e7a4 bootstrap: Add openssl configuration for sparc-unknown-linux-gnu 2018-02-23 11:20:23 +01:00
John Paul Adrian Glaubitz a895d438c2 bootstrap: Add missing cputype matching for sparc 2018-02-23 11:18:29 +01:00
kennytm 0d300d4b9d
Split test::Docs into one Step for each book.
The *.md at the root directory in src/doc are no longer tested, but this
should be fine since all files there are deprecated.
2018-02-23 07:09:46 +08:00
kennytm 51238c77e6
CI: Fixed the incorrect folder region when building codegen dylib. 2018-02-23 07:09:46 +08:00
Mark Simulacrum 24b485b918 Bootstrap from the 1.25 beta 2018-02-20 08:52:33 -07:00
Josh Stone 8174c0d659 rustbuild: make libdir_relative a method 2018-02-19 16:08:36 -08:00
Josh Stone 80970e6953 rustbuild: Restore Config.libdir_relative
This re-introduces a `Config.libdir_relative` field, now derived from
`libdir` and made relative to `prefix` if necessary.

This fixes a regression from #46592 when `--libdir` is given an absolute
path.  `Builder::sysroot_libdir` should always use a relative path so
its callers don't clobber system locations, and `librustc` also asserts
that `CFG_LIBDIR_RELATIVE` is really relative.
2018-02-19 14:17:31 -08:00
Guillaume Gomez af140ecdbc
Rollup merge of #48275 - matthiaskrgr:codespell, r=kennytm,varkor
fix more typos found by codespell.
2018-02-18 13:21:01 +01:00
Guillaume Gomez b7791b0c7e
Rollup merge of #48274 - GuillaumeGomez:remove-hoedown, r=QuietMisdreavus
Remove hoedown from rustdoc

Finally the time has come!

r? @QuietMisdreavus
2018-02-18 13:20:59 +01:00
Matthias Krüger 4452446292 fix more typos found by codespell. 2018-02-17 17:38:49 +01:00
Guillaume Gomez 8e46927235 Add command to launch only doc tests 2018-02-17 16:58:14 +01:00
Guillaume Gomez 5bd5bc3f21 Remove hoedown from rustdoc
Is it really time? Have our months, no, *years* of suffering come to an end? Are we finally able to cast off the pall of Hoedown? The weight which has dragged us down for so long?

-----

So, timeline for those who need to catch up:

* Way back in December 2016, [we decided we wanted to switch out the markdown renderer](https://github.com/rust-lang/rust/issues/38400). However, this was put on hold because the build system at the time made it difficult to pull in dependencies from crates.io.
* A few months later, in March 2017, [the first PR was done, to switch out the renderers entirely](https://github.com/rust-lang/rust/pull/40338). The PR itself was fraught with CI and build system issues, but eventually landed.
* However, not all was well in the Rustdoc world. During the PR and shortly after, we noticed [some differences in the way the two parsers handled some things](https://github.com/rust-lang/rust/issues/40912), and some of these differences were major enough to break the docs for some crates.
* A couple weeks afterward, [Hoedown was put back in](https://github.com/rust-lang/rust/pull/41290), at this point just to catch tests that Pulldown was "spuriously" running. This would at least provide some warning about spurious tests, rather than just breaking spontaneously.
* However, the problems had created enough noise by this point that just a few days after that, [Hoedown was switched back to the default](https://github.com/rust-lang/rust/pull/41431) while we came up with a solution for properly warning about the differences.
* That solution came a few weeks later, [as a series of warnings when the HTML emitted by the two parsers was semantically different](https://github.com/rust-lang/rust/pull/41991). But that came at a cost, as now rustdoc needed proc-macro support (the new crate needed some custom derives farther down its dependency tree), and the build system was not equipped to handle it at the time. It was worked on for three months as the issue stumped more and more people.
  * In that time, [bootstrap was completely reworked](https://github.com/rust-lang/rust/pull/43059) to change how it ordered compilation, and [the method by which it built rustdoc would change](https://github.com/rust-lang/rust/pull/43482), as well. This allowed it to only be built after stage1, when proc-macros would be available, allowing the "rendering differences" PR to finally land.
  * The warnings were not perfect, and revealed a few [spurious](https://github.com/rust-lang/rust/pull/44368) [differences](https://github.com/rust-lang/rust/pull/45421) between how we handled the renderers.
  * Once these were handled, [we flipped the switch to turn on the "rendering difference" warnings all the time](https://github.com/rust-lang/rust/pull/45324), in October 2017. This began the "warning cycle" for this change, and landed in stable in 1.23, on 2018-01-04.
  * Once those warnings hit stable, and after a couple weeks of seeing whether we would get any more reports than what we got from sitting on nightly/beta, [we switched the renderers](https://github.com/rust-lang/rust/pull/47398), making Pulldown the default but still offering the option to use Hoedown.

And that brings us to the present. We haven't received more new issues from this in the meantime, and the "switch by default" is now on beta. Our reasoning is that, at this point, anyone who would have been affected by this has run into it already.
2018-02-16 23:17:15 +01:00
Jonathan A. Kollasch ebec5e3906 Add powerpc-unknown-netbsd target 2018-02-16 14:29:24 -06:00
kennytm c788433b15
Fix panic when `x.py` is called without any arguments. 2018-02-16 14:31:25 +08:00
Mark Simulacrum 366a65665a Consider paths passed to x.py to be root-relative.
We'd previously assumed that these paths would be relative to the src
dir, and that for example our various CI scripts would, when calling
x.py, use `../x.py build ../src/tools/...` but this isn't the case --
they use `../x.py` without using the relevant source-relative path.

We eventually may want to make this (actually somewhat logical) change,
but this is not that time.
2018-02-15 19:12:26 -07:00
Mark Simulacrum e78ecd2e70 Prevent silently ignoring unmatched paths
Primarily for CI purposes; this is intended to avoid cases where we
update rustbuild and unintentionally make CI stop running some builds to
the arguments being passed no longer applying for some reason.
2018-02-15 18:11:57 -07:00
bors 1670a532dd Auto merge of #48203 - kennytm:rollup, r=kennytm
Rollup of 23 pull requests

- Successful merges: #47784, #47806, #47846, #48005, #48033, #48065, #48087, #48114, #48126, #48130, #48133, #48151, #48154, #48156, #48162, #48163, #48165, #48167, #48181, #48186, #48195, #48035, #48210
- Failed merges:
2018-02-15 13:35:20 +00:00
bors c83fa5d91c Auto merge of #48105 - Mark-Simulacrum:exclude-paths, r=alexcrichton
Implement excluding a build-step via --exclude

First step to fixing https://github.com/rust-lang/rust/issues/47911. This doesn't change any CI configuration, but implements what I believe necessary to make that feasible in rustbuild.

In theory this should be sufficient to allow someone to open a PR against .travis.yml and appveyor.yml which splits the Windows 32-bit tests and maybe the OS X tests into multiple builders (depending on what our cost-concerns are) to reduce runtimes.

r? @alexcrichton
cc @kennytm
2018-02-15 10:32:33 +00:00
Alex Crichton e0da9902a1
Revert "rustbuild: Pass `ccache` to build scripts"
This reverts commit 64a8730e17.
2018-02-15 00:04:18 +08:00
kennytm 2be44ceaa2
Rollup merge of #47846 - roblabla:bugfix-ocaml, r=kennytm
Work around LLVM OCAML binding installation failure

Hello,

I have OCaml installed on my machine, and compiling rust systematically fails when LLVM attempts installing the OCaml bindings in `/usr/lib/ocaml`, which is write-protected. Here are the logs: https://gist.github.com/roblabla/3f147914c5df627c9d97ab311ba133ad

Some digging around the issue reveals:

- The code that finds if OCaml is installed, and sets the bindings to be compiled/installed: b24a45d2e9/cmake/config-ix.cmake (L612)
- b24a45d2e9/bindings/ocaml/llvm/CMakeLists.txt Some code that does the installation.

The problem seems to be that `LLVM_OCAML_INSTALL_PATH` is set to `OCAML_STDLIB_PATH` by default, which is in `/usr/lib/ocaml`, instead of the prefix.

This PR "fixes" the issue by setting `LLVM_OCAML_INSTALL_PATH` to `usr/lib/ocaml`. I haven't found a way to make LLVM not build OCaml, which would probably be a superior fix.
2018-02-14 16:14:29 +08:00
Mark Simulacrum a64575c3bd Fix default Steps without paths.
Some Steps are by-default run but don't have any paths associated with
them. We need to have at least one PathSet per each Step, though, so we
add an empty one on calls to `never()`.
2018-02-13 18:46:29 -07:00
Mark Simulacrum f104b12059 Change Step to be invoked with a path when in default mode.
Previously, a Step would be able to tell on its own when it was invoked
"by-default" (that is, `./x.py test` was called instead of `./x.py test
some/path`). This commit replaces that functionality, invoking each Step
with each of the paths it has specified as "should be invoked by."

For example, if a step calls `path("src/tools/cargo")` and
`path("src/doc/cargo")` then it's make_run will be called twice, with
"src/tools/cargo" and "src/doc/cargo." This makes it so that default
handling logic is in builder, instead of spread across various Steps.

However, this meant that some Step specifications needed to be updated,
since for example `rustdoc` can be built by `./x.py build
src/librustdoc` or `./x.py build src/tools/rustdoc`. A `PathSet`
abstraction is added that handles this: now, each Step can not only list
`path(...)` but also `paths(&[a, b, ...])` which will make it so that we
don't invoke it with each of the individual paths, instead invoking it
with the first path in the list (though this shouldn't be depended on).

Future work likely consists of implementing a better/easier way for a
given Step to work with "any" crate in-tree, especially those that want
to run tests, build, or check crates in the std, test, or rustc crate
trees. Currently this is rather painful to do as most of the logic is
duplicated across should_run and make_run. It seems likely this can be
abstracted away into builder somehow.
2018-02-11 10:03:16 -07:00
Mark Simulacrum 55c36e3744 Remove DontDistWithMiri struct and instead just directly check it in builder 2018-02-10 18:18:41 -07:00
Mark Simulacrum 11580b7be3 Make exclude and paths relative to root of checkout 2018-02-10 18:15:34 -07:00
Mark Simulacrum 8c506f9dae Implement excluding a build-step via --exclude 2018-02-10 17:37:42 -07:00
roblabla 3c01dea03e Add comment about the problem, and use provided path if available 2018-02-10 21:29:10 +01:00
kennytm 18d7be3381
Rollup merge of #48120 - matthiaskrgr:typos_src_1, r=alexcrichton
fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}}

via codespell
2018-02-11 00:53:05 +08:00
Matthias Krüger 7ee3e39f64 fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}} 2018-02-10 12:22:57 +01:00
kennytm 22c5067ae1
Rollup merge of #48098 - alexcrichton:fix-i686-dist-bootstrap, r=Mark-Simulacrum
ci: Actually bootstrap on i686 dist

Right now the `--build` option was accidentally omitted, so we're bootstraping
from `x86_64` to `i686`. In addition to being slower (more compiles) that's not
actually bootstrapping!
2018-02-10 14:24:07 +08:00
kennytm 73d276779e
Rollup merge of #48059 - alexcrichton:sccachebs, r=Mark-Simulacrum
rustbuild: Pass `ccache` to build scripts

Right now the ccache setting is only used for LLVM, but this tweaks it to also
be used for build scripts so C++ builds like `librustc_llvm` can be a bit
speedier.
2018-02-10 14:24:02 +08:00
kennytm 077979f4a2
Rollup merge of #48015 - o01eg:disableable-installation, r=alexcrichton
Customizable extended tools

This PR adds `build.tools` option to manage installation of extended rust tools.

By default it doesn't change installation. All tools are built and `rls` and `rustfmt` allowed to fail installation.

If some set of tools chosen only those tools are built and installed without any fails allowed.

It solves some slotting issues with extended build enabled: https://bugs.gentoo.org/show_bug.cgi?id=645498
2018-02-10 14:23:57 +08:00
Alex Crichton 6b7b6b63a9 rustc: Upgrade to LLVM 6
The following submodules have been updated for a new version of LLVM:

- `src/llvm`
- `src/libcompiler_builtins` - transitively contains compiler-rt
- `src/dlmalloc`

This also updates the docker container for dist-i686-freebsd as the old 16.04
container is no longer capable of building LLVM. The
compiler-rt/compiler-builtins and dlmalloc updates are pretty routine without
much interesting happening, but the LLVM update here is of particular note.
Unlike previous updates I haven't cherry-picked all existing patches we had on
top of our LLVM branch as we have a [huge amount][patches4] and have at this
point forgotten what most of them are for. Instead I started from the current
`release_60` branch in LLVM and only applied patches that were necessary to get
our tests working and building.

The current set of custom rustc-specific patches included in this LLVM update are:

* rust-lang/llvm@1187443 - this is how we actually implement
  `cfg(target_feature)` for now and continues to not be upstreamed. While a
  hazard for SIMD stabilization this commit is otherwise keeping the status
  quo of a small rustc-specific feature.
* rust-lang/llvm@013f2ec - this is a rustc-specific optimization that we haven't
  upstreamed, notably teaching LLVM about our allocation-related routines (which
  aren't malloc/free). Once we stabilize the global allocator routines we will
  likely want to upstream this patch, but for now it seems reasonable to keep it
  on our fork.
* rust-lang/llvm@a65bbfd - I found this necessary to fix compilation of LLVM in
  our 32-bit linux container. I'm not really sure why it's necessary but my
  guess is that it's because of the absolutely ancient glibc that we're using.
  In any case it's only updating pieces we're not actually using in LLVM so I'm
  hoping it'll turn out alright. This doesn't seem like something we'll want to
  upstream.c
* rust-lang/llvm@77ab1f0 - this is what's actually enabling LLVM to build in our
  i686-freebsd container, I'm not really sure what's going on but we for sure
  probably don't want to upstream this and otherwise it seems not too bad for
  now at least.
* rust-lang/llvm@9eb9267 - we currently suffer on MSVC from an [upstream bug]
  which although diagnosed to a particular revision isn't currently fixed
  upstream (and the bug itself doesn't seem too active). This commit is a
  partial revert of the suspected cause of this regression (found via a
  bisection). I'm sort of hoping that this eventually gets fixed upstream with a
  similar fix (which we can replace in our branch), but for now I'm also hoping
  it's a relatively harmless change to have.

After applying these patches (plus one [backport] which should be [backported
upstream][llvm-back]) I believe we should have all tests working on all
platforms in our current test suite. I'm like 99% sure that we'll need some more
backports as issues are reported for LLVM 6 when this propagates through
nightlies, but that's sort of just par for the course nowadays!

In any case though some extra scrutiny of the patches here would definitely be
welcome, along with scrutiny of the "missing patches" like a [change to pass
manager order](rust-lang/llvm@2717444753), [another change to pass manager
order](rust-lang/llvm@c782febb7b), some [compile fixes for
sparc](rust-lang/llvm@1a83de63c4), and some [fixes for
solaris](rust-lang/llvm@c2bfe0abb).

[patches4]: https://github.com/rust-lang/llvm/compare/5401fdf23...rust-llvm-release-4-0-1
[backport]: https://github.com/rust-lang/llvm/commit/5c54c252db
[llvm-back]: https://bugs.llvm.org/show_bug.cgi?id=36114
[upstream bug]: https://bugs.llvm.org/show_bug.cgi?id=36096

---

The update to LLVM 6 is desirable for a number of reasons, notably:

* This'll allow us to keep up with the upstream wasm backend, picking up new
  features as they start landing.
* Upstream LLVM has fixed a number of SIMD-related compilation errors,
  especially around AVX-512 and such.
* There's a few assorted known bugs which are fixed in LLVM 5 and aren't fixed
  in the LLVM 4 branch we're using.
* Overall it's not a great idea to stagnate with our codegen backend!

This update is mostly powered by #47730 which is allowing us to update LLVM
*independent* of the version of LLVM that Emscripten is locked to. This means
that when compiling code for Emscripten we'll still be using the old LLVM 4
backend, but when compiling code for any other target we'll be using the new
LLVM 6 target. Once Emscripten updates we may no longer need this distinction,
but we're not sure when that will happen!

Closes #43370
Closes #43418
Closes #47015
Closes #47683
Closes rust-lang-nursery/stdsimd#157
Closes rust-lang-nursery/rust-wasm#3
2018-02-09 17:13:14 -08:00
Alex Crichton 9c05babe25 ci: Actually bootstrap on i686 dist
Right now the `--build` option was accidentally omitted, so we're bootstraping
from `x86_64` to `i686`. In addition to being slower (more compiles) that's not
actually bootstrapping!
2018-02-09 10:12:32 -08:00
Alex Crichton 64a8730e17 rustbuild: Pass `ccache` to build scripts
Right now the ccache setting is only used for LLVM, but this tweaks it to also
be used for build scripts so C++ builds like `librustc_llvm` can be a bit
speedier.
2018-02-08 16:26:49 -08:00
Guillaume Gomez dec9fab768 Convert python script to rust 2018-02-08 10:53:09 +01:00
Guillaume Gomez b1b11d4589 Pass themes folder as parameter 2018-02-08 10:53:09 +01:00
Guillaume Gomez 51580d46f9 Add tests for themes 2018-02-08 10:53:09 +01:00
O01eg 78a0b7fd46
Refactor checks on list of extended tools. 2018-02-07 20:57:02 +03:00
O01eg 7be8e2fbb3
Add build.tools option to manage installation of extended rust tools. 2018-02-05 20:10:05 +03:00
Onur Aslan 1461d12b3c Use time crate in bootstrap dist instead of date 2018-02-05 11:39:54 +03:00
bors e7e982ac03 Auto merge of #47998 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests

- Successful merges: #47862, #47877, #47896, #47912, #47947, #47958, #47978, #47996, #47999, #47892
- Failed merges:
2018-02-04 22:58:10 +00:00
John Kåre Alsaker 32d5fbe8b2 Run the `run-make` tests last, so more tests run on Windows when `make` is unavailable 2018-02-04 14:52:31 +01:00
Mark Simulacrum e1f04c04df Disable ThinLTO for dist builds.
Dist builds should always be as fast as we can make them, and since
those run on CI we don't care quite as much for the build being somewhat
slower. As such, we don't automatically enable ThinLTO on builds for the
dist builders.
2018-02-03 18:38:17 -07:00
bors 6741e416fe Auto merge of #47102 - Diggsey:wasm-syscall, r=alexcrichton
Implement extensible syscall interface for wasm

Currently it's possible to run tests with the native wasm target, but it's not possible to tell whether they pass or to capture the output, because libstd throws away stdout, stderr and the exit code. While advanced libstd features should probably require more specific targets (eg. wasm-unknown-web) I think even the unknown target should at least support basic I/O.

Any solution is constrained by these factors:
- It must not be javascript specific
- There must not be too strong coupling between libstd and the host environment (because it's an "unknown" target)
- WebAssembly does not allow "optional" imports - all imports *must* be resolved.
- WebAssembly does not support calling the host environment through any channel *other* than imports.

The best solution I could find to these constraints was to give libstd a single required import, and implement a syscall-style interface through that import. Each syscall is designed such that a no-op implementation gives the most reasonable fallback behaviour. This means that the following import table would be perfectly valid:
```javascript
imports.env = { rust_wasm_syscall: function(index, data) {} }
```

Currently I have implemented these system calls:
- Read from stdin
- Write to stdout/stderr
- Set the exit code
- Get command line arguments
- Get environment variable
- Set environment variable
- Get time

It need not be extended beyond this set if being able to run tests for this target is the only goal.

edit:
As part of this PR I had to make a further change. Previously, the rust entry point would be automatically called when the webassembly module was instantiated. This was problematic because from the javascript side it was impossible to call exported functions, access program memory or get a reference to the instance.

To solve this, ~I changed the default behaviour to not automatically call the entry point, and added a crate-level attribute to regain the old behaviour. (`#![wasm_auto_run]`)~ I disabled this behaviour when building tests.
2018-02-02 01:27:14 +00:00
Alex Crichton 8ebe542480 rustc: Move location of `codegen-backends` dir
Right now this directory is located under:

  $sysroot/lib/rustlib/$target/lib/codegen-backends

but after seeing what we do in a few other places it seems that a more
appropriate location would be:

  $sysroot/lib/rustlib/$target/codegen-backends

so this commit moves it!
2018-01-31 10:16:26 -08:00
Diggory Blake 0e6601f630 Add wasm_syscall feature to build system 2018-01-30 23:22:23 +00:00
kennytm e8868bdc56 Rollup merge of #47836 - Mark-Simulacrum:stage-flags, r=alexcrichton
Add per-stage RUSTFLAGS: RUSTFLAGS_STAGE_{0,1,2} and RUSTFLAGS_STAGE_NOT_0

Fixes #47658.

r? @alexcrichton
2018-01-30 17:10:57 +08:00
Mark Simulacrum e09a8bd70c Add per-stage RUSTFLAGS: RUSTFLAGS_STAGE_{0,1,2} and RUSTFLAGS_STAGE_NOT_0
Fixes #47658.
2018-01-29 07:02:09 -07:00
roblabla c04d86deeb Work around LLVM OCAML binding installation failure 2018-01-29 11:07:11 +01:00
Alex Crichton c6daea7c9a rustc: Split Emscripten to a separate codegen backend
This commit introduces a separately compiled backend for Emscripten, avoiding
compiling the `JSBackend` target in the main LLVM codegen backend. This builds
on the foundation provided by #47671 to create a new codegen backend dedicated
solely to Emscripten, removing the `JSBackend` of the main codegen backend in
the process.

A new field was added to each target for this commit which specifies the backend
to use for translation, the default being `llvm` which is the main backend that
we use. The Emscripten targets specify an `emscripten` backend instead of the
main `llvm` one.

There's a whole bunch of consequences of this change, but I'll try to enumerate
them here:

* A *second* LLVM submodule was added in this commit. The main LLVM submodule
  will soon start to drift from the Emscripten submodule, but currently they're
  both at the same revision.
* Logic was added to rustbuild to *not* build the Emscripten backend by default.
  This is gated behind a `--enable-emscripten` flag to the configure script. By
  default users should neither check out the emscripten submodule nor compile
  it.
* The `init_repo.sh` script was updated to fetch the Emscripten submodule from
  GitHub the same way we do the main LLVM submodule (a tarball fetch).
* The Emscripten backend, turned off by default, is still turned on for a number
  of targets on CI. We'll only be shipping an Emscripten backend with Tier 1
  platforms, though. All cross-compiled platforms will not be receiving an
  Emscripten backend yet.

This commit means that when you download the `rustc` package in Rustup for Tier
1 platforms you'll be receiving two trans backends, one for Emscripten and one
that's the general LLVM backend. If you never compile for Emscripten you'll
never use the Emscripten backend, so we may update this one day to only download
the Emscripten backend when you add the Emscripten target. For now though it's
just an extra 10MB gzip'd.

Closes #46819
2018-01-28 18:32:45 -08:00
bors 385ef1514c Auto merge of #47663 - malbarbo:mips-crt-static, r=alexcrichton
Do not assume dynamic linking for musl/mips[el] targets

All musl targets except mips[el] assume static linking by default. This can be [confusing](https://users.rust-lang.org/t/static-cross-compiled-binaries-arent-really-static/6084).

When the musl/mips[el] targets was [added](https://github.com/rust-lang/rust/pull/31298), dynamic linking was chosen because of binary size concerns, and probably also because libunwind [didn't](https://users.rust-lang.org/t/static-cross-compiled-binaries-arent-really-static/6084/8) supported mips.

Now that we have `crt-static` target-feature (the user can choose dynamic link for musl targets), and libunwind [6.0](https://github.com/llvm-mirror/libunwind/commits/release_60) add support to mips, we do not need to assume dynamic linking.
2018-01-28 23:30:15 +00:00
Alex Crichton 884715c654 rustc: Load the `rustc_trans` crate at runtime
Building on the work of # 45684 this commit updates the compiler to
unconditionally load the `rustc_trans` crate at runtime instead of linking to it
at compile time. The end goal of this work is to implement # 46819 where rustc
will have multiple backends available to it to load.

This commit starts off by removing the `extern crate rustc_trans` from the
driver. This involved moving some miscellaneous functionality into the
`TransCrate` trait and also required an implementation of how to locate and load
the trans backend. This ended up being a little tricky because the sysroot isn't
always the right location (for example `--sysroot` arguments) so some extra code
was added as well to probe a directory relative to the current dll (the
rustc_driver dll).

Rustbuild has been updated accordingly as well to have a separate compilation
invocation for the `rustc_trans` crate and assembly it accordingly into the
sysroot. Finally, the distribution logic for the `rustc` package was also
updated to slurp up the trans backends folder.

A number of assorted fallout changes were included here as well to ensure tests
pass and such, and they should all be commented inline.
2018-01-27 19:16:21 -08:00
Alex Crichton b741d7d7ac Merge branch 'beta-prerelease' of https://github.com/cuviper/rust into rollup 2018-01-26 06:52:55 -08:00
Josh Stone a76bb8806a Call non-git beta builds simply x.y.z-beta
We can't use git commands to compute a prerelease version when we're
building from a source tarball, or if git is otherwise unavailable.
We'll just call such builds `x.y.z-beta`, without a prerelease.
2018-01-25 16:22:58 -08:00
Mark Simulacrum 6aeb1cfb64 Add ./x.py check src/{libstd,libtest,rustc}.
This currently only supports a limited subset of the full compilation,
but is likely 90% of what people will want and is possible without
building a full compiler (i.e., running LLVM). In theory, this means
that contributors who don't want to build LLVM now have an easy way to
compile locally, though running tests won't work.
2018-01-23 19:39:20 -07:00
Mark Simulacrum 734ee0fb43 Rename check.rs to test.rs 2018-01-23 19:39:20 -07:00
kennytm 52f8d2dc35 Rollup merge of #47558 - spastorino:rustc_args, r=nikomatsakis
Add rustc-args option to test runner

r? @nikomatsakis
2018-01-23 17:03:39 +08:00
Marco A L Barbosa 68db72d8cd Do not assume dynamic linking for musl/mips[el] targets
All musl targets except mips[el] assume static linking by default. This
can be confusing
https://users.rust-lang.org/t/static-cross-compiled-binaries-arent-really-static/6084

When the musl/mips[el] targets was
[added](https://github.com/rust-lang/rust/pull/31298), dynamic linking
was chosen because of binary size concerns, and probably also because
libunwind
[didn't](https://users.rust-lang.org/t/static-cross-compiled-binaries-arent-really-static/6084/8)
supported mips.

Now that we have `crt-static` target-feature (the user can choose
dynamic link for musl targets), and libunwind
[6.0](https://github.com/llvm-mirror/libunwind/commits/release_60) add
support to mips, we do not need to assume dynamic linking.
2018-01-22 16:14:51 -02:00
Guillaume Gomez 35221d8d68 Rollup merge of #47582 - alexcrichton:auto-beta, r=kennytm
Automaticaly calculate beta prerelease numbers

This is a forward-port of:

* 9426dda83d7a928d6ced377345e14b84b0f11c21
* cbfb9858951da7aee22d82178405306fca9decb1

from the beta branch which is used to automatically calculate the beta number
based on the number of merges to the beta branch so far.
2018-01-21 23:11:40 +01:00
Alex Crichton 06913a5b1d Automaticaly calculate beta prerelease numbers
This is a forward-port of:

* 9426dda83d7a928d6ced377345e14b84b0f11c21
* cbfb9858951da7aee22d82178405306fca9decb1

from the beta branch which is used to automatically calculate the beta number
based on the number of merges to the beta branch so far.
2018-01-19 08:57:01 -08:00
bors 10333dde82 Auto merge of #47494 - michaelwoerister:proc-macro-incremental, r=nikomatsakis
Don't include DefIndex in proc-macro registrar function symbol.

There can only ever be one registrar function per plugin or proc-macro crate, so adding the `DefIndex` to the function's symbol name does not serve a real purpose. Remove the `DefIndex` from the symbol name makes it stable across incremental compilation sessions.

This should fix issue #47292.
2018-01-19 04:45:22 +00:00
Santiago Pastorino db41f1e1cf Add rustc-args option to test runner 2018-01-19 00:59:45 -03:00
bors 3bd4af88be Auto merge of #47528 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 6 pull requests

- Successful merges: #47250, #47313, #47398, #47468, #47471, #47520
- Failed merges:
2018-01-18 14:03:12 +00:00
Alex Crichton 80d6ed2d8b Update Cargo and its dependencies
This'll probably have a bunch of build errors, so let's try and head those off
and find them sooner rather than later!
2018-01-17 23:14:23 -08:00
Guillaume Gomez 6c64f0bff6 Rollup merge of #47250 - GuillaumeGomez:test-rustdoc-js, r=Mark-Simulacrum
Test rustdoc js

Add tests for the rustdoc search. It was heavily required because of all the recent breaking changes that happened while I went through improvements in doc search (add search in/for generic search for example).
2018-01-17 23:43:26 +01:00
Michael Woerister f0a7d8e2bd Add incremental-fulldeps test suite and regression test for #47290. 2018-01-16 19:31:15 +01:00
bors bb345a0be3 Auto merge of #46196 - projektir:rbe-submodule, r=steveklabnik
Adding RBE as a submodule #46194

Adding RBE as a submodule to start issue #46194.
2018-01-15 02:02:22 +00:00
Guillaume Gomez 026c749989 Only run rustdoc-js test suite when nodejs is available 2018-01-13 22:35:41 +01:00
projektir a2df413187 Adding RBE as a submodule #46194 2018-01-13 13:04:53 -08:00
bors 6cf081c8c5 Auto merge of #46592 - o01eg:fix-45345, r=alexcrichton
Fix 45345

There is a fix for https://github.com/rust-lang/rust/issues/45345

It re-introduces `CFG_LIBDIR_RELATIVE` which was broken when migration from `configure` script to `x.py`.

Other commits fix errors which happen after rustbuild cleanups.
2018-01-13 05:02:04 +00:00
Guillaume Gomez 69521996c8 End of rustdoc-js tool add into builder 2018-01-12 23:40:00 +01:00
Guillaume Gomez 50bb6ba13e Move forward to add rustdoc test 2018-01-12 22:51:34 +01:00
Guillaume Gomez f18c52b223 Start adding js tests 2018-01-12 22:51:34 +01:00
O01eg 472f4e1cc8
Remove unused configuration parameter `libdir_relative`. 2018-01-12 10:05:08 +03:00
O01eg 83e76d6f29
Remove unused argument `rustc_cargo`. 2018-01-12 10:05:02 +03:00
O01eg f05282f036
Add library path for real rustdoc with `RUSTDOC_LIBDIR` environment variable. 2018-01-12 10:04:02 +03:00
O01eg c87a1086dc
Build all stages with relative libdirs. 2018-01-12 07:11:13 +03:00
O01eg 0f5110ea49
Stage 1 and later use relative libdir. 2018-01-12 07:11:13 +03:00
O01eg 27b4f225ea
Accept verbosity in rustdoc. 2018-01-12 07:11:12 +03:00
O01eg ee8b5783af
Fix #45345.
Re-implement

```bash
CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut -c$((${#CFG_PREFIX}+${CAT_INC}))-`
```

from old `configure` script.
2018-01-12 07:10:58 +03:00
Marco A L Barbosa 882cd3cf0b Add i586-unknown-linux-musl target 2018-01-11 15:57:28 -02:00
bors 72176cf96c Auto merge of #47141 - alexcrichton:bump-bootstrap, r=alexcrichton
Bump to 1.25.0

* Bump the release version to 1.25
* Bump the bootstrap compiler to the recent beta
* Allow using unstable rustdoc features on beta - this fix has been applied to
  the beta branch but needed to go to the master branch as well.
2018-01-06 14:50:14 +00:00
Alex Crichton 0e795a2106 rustbuild: Don't allow stable bootstrap from dev
I forgot to update the bootstrap compiler for the 1.23.0 release so let's make
sure it doesn't happen again!
2018-01-04 13:14:15 -08:00
Alex Crichton 8c9bf663d4 rustc: Don't use relative paths for extended errors
These no longer work now that Cargo changes the cwd of rustc while it's running.
Instead use an absolute path that's set by rustbuild.
2018-01-04 07:21:22 -08:00
Alex Crichton 53fd0c50d8 Bump to 1.25.0
* Bump the release version to 1.25
* Bump the bootstrap compiler to the recent beta
* Allow using unstable rustdoc features on beta - this fix has been applied to
  the beta branch but needed to go to the master branch as well.
2018-01-04 07:21:22 -08:00
bors 966fdf15e2 Auto merge of #46883 - QuietMisdreavus:faildown, r=GuillaumeGomez
rustdoc: add option to abort the process on markdown differences

In the efforts of keeping the std docs free of markdown warnings, this PR adds a stopgap measure to make sure the CI fails if it detects a markdown difference. It does this by adding a new unstable flag to rustdoc, `--deny-render-differences`, which bootstrap then passes to rustdoc when documenting std and friends.

The implementation is... probably not the cleanest option. It currently adds an extra branch after it prints the markdown warnings, which just prints a final line and calls `::std::process::abort(1)`. I did it like this because if it just panics regularly, it looks like an ICE, an even though `html::render::run` returns a Result, that Result is also just `expect`ed immediately, generating the same problem. This way bypasses the panic handler at the top of the thread and looks like a proper failure. Since i don't have a real error Handler there, this is the best i can do without pulling in a real error system for rustdoc.

This PR is blocked on https://github.com/rust-lang/rust/pull/46853, which will fix the rendering differences that were present on master when i started this branch.
2017-12-29 03:23:37 +00:00
QuietMisdreavus dfbb946649 bootstrap: pass --deny-render-differences to rustdoc 2017-12-27 10:09:23 -06:00