Commit Graph

153 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Guillaume Gomez
51580d46f9 Add tests for themes 2018-02-08 10:53:09 +01: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
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
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
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
Guillaume Gomez
026c749989 Only run rustdoc-js test suite when nodejs is available 2018-01-13 22:35:41 +01: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
83e76d6f29
Remove unused argument rustc_cargo. 2018-01-12 10:05:02 +03: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
kennytm
44954ab52d
Clarify toolstate names. Move publish.py to a more convenient location. 2017-12-27 00:00:46 +08:00
kennytm
2566fa25c7
Revert "Add a file to trivially disable tool building or testing"
This reverts commit ab018c76e1.

This also adds the `ToolBuild::is_ext_tool` field to replace the previous
`ToolBuild::expectation` field, to indicate whether a build-failure of
certain tool is essential.
2017-12-27 00:00:45 +08:00
Oliver Schneider
8c2ec689c1
Put miri const eval checking behind -Zmiri 2017-12-12 08:59:25 +01:00
Oliver Schneider
acdf83f228
Update miri to rustc changes 2017-12-06 09:25:29 +01:00
Nick Cameron
bfcb290937 Add RLS and Rustfmt to the toolstate mechanism 2017-09-27 15:40:57 -07:00
Oliver Schneider
d64a067423
Add clippy to toolstate.toml 2017-09-19 09:20:35 +02:00
Ximin Luo
8f25497d78 rustbuild: with --no-fail-fast, report the specific commands that failed 2017-09-18 21:21:24 +02:00
Oliver Schneider
01555b1da1
Rebase fallout 2017-09-17 21:45:54 +02:00
Oliver Schneider
ab018c76e1
Add a file to trivially disable tool building or testing 2017-09-17 21:41:45 +02:00
Oliver Schneider
f381744d91
Get the miri test suite to run inside the rustc dev environment 2017-09-17 21:40:13 +02:00
Tim Neumann
eea2f5596a Rollup merge of #44533 - nrc:rustfmt-submod, r=alexcrichton
Add Rustfmt

r? @alexcrichton
2017-09-17 13:19:04 +02:00
Alex Crichton
3da54fb036 rustbuild: Fix test "test rustdoc" invocation
Previously it would use the librustc output directory which would cause rustdoc
to get entirely recompiled, whereas the intention is that it uses the
already-compiled artifacts from building rustdoc itself, using the tool output
directory
2017-09-15 15:28:59 -07:00
Nick Cameron
d0070e85db Build and test Rustfmt 2017-09-13 16:18:45 +12:00
Mark Simulacrum
f87696b268 Test rustdoc unit tests.
Doc tests are temporarily disabled until next release cycle, since
current beta Cargo errors on them. Upgrade should be smooth as the
relevant tests are already fixed in this commit.
2017-09-05 11:17:52 -06:00
Zack M. Davis
1b6c9605e4 use field init shorthand EVERYWHERE
Like #43008 (f668999), but _much more aggressive_.
2017-08-15 15:29:17 -07:00
bors
e324594844 Auto merge of #43842 - bjorn3:no_llvm_cleanup, r=alexcrichton
Cleanup for "Support compiling rustc without LLVM (try 2)"

This includes a small patch to allow running tests without llvm. Also check if you are not trying to compile a dylib.

cc #42932
r? @alexcrichton
2017-08-14 02:11:18 +00:00
bjorn3
1c28cf5b68 Change run-make ignore message 2017-08-13 16:49:09 +02:00
bjorn3
0c97bbf424
Remove some more cfg's 2017-08-13 12:30:54 +02:00
Mark Simulacrum
facf5a91c4 Build rustdoc only at the top stage 2017-08-13 05:15:43 +05:00
Mark Simulacrum
44ffb61623 Unify flags into config.
This introduces a slight change in behavior, where we unilaterally
respect the --host and --target parameters passed for all sanity
checking and runtime configuration.
2017-08-13 05:15:43 +05:00
Alex Crichton
8e7849e766 rustbuild: Use Cargo's "target runner"
This commit leverages a relatively new feature in Cargo to execute
cross-compiled tests, the `target.$target.runner` configuration. We configure it
through environment variables in rustbuild and this avoids the need for us to
locate and run tests after-the-fact, instead relying on Cargo to do all that
execution for us.
2017-07-28 18:00:31 -07:00
Mark Simulacrum
9ee877bbe6 Correct a few run.host invocations where run.target is intended. 2017-07-27 09:58:03 -06:00
Mark Simulacrum
4e5333cb2b Don't needlessly build rustdoc for compiletest.
For most tests, rustdoc isn't needed, so avoid building it.
2017-07-27 05:51:22 -06:00
Mark Simulacrum
e2e9b40e9a Build rustdoc on-demand.
Rustdoc is no longer compiled in every stage, alongside rustc, instead
it is only compiled when requested, and generally only for the last
stage.
2017-07-27 05:51:22 -06:00