Uh oh!
There was an error while loading. Please reload this page.
add preliminary support for incremental compilation to rustbuild.py - #38072
Conversation
nikomatsakis
commented
Nov 29, 2016
Probably I should remove the code that dumps the rustc command line -- well, more specifically, I should make it a separate option, distinct from |
There was a problem hiding this comment.
This seems like a copy-and-paste artifact.
nikomatsakis
commented
Nov 29, 2016
So, I take it back, I actually am getting reuse locally. I'm experimenting more now. I also have some local fixes to make before this lands:
|
nikomatsakis
commented
Nov 29, 2016
OK, this is... good to go I guess, though maybe it would be better to avoid printing the full verbose output unless the verbosity is at "level 2" or something like that. Anyway, using it locally, and running with |
nikomatsakis
commented
Nov 29, 2016
Fixed the verbosity level concern in the latest commit by adding |
There was a problem hiding this comment.
Technically rustbuild already places all of it's output in a build directory, so this'll create build/build. Maybe we could leave the separate directory bits to a different section of the readme?
There was a problem hiding this comment.
Yeah, I'll remove it. I just still find that it's better to have a build directory, since it winds up with quite a lot of files in it:
> ls
build config.mk config.stamp Makefile tmp
There was a problem hiding this comment.
I think that --local-rust-root and --enable-local-rust can both be elided here. At least rustbuild only takes a look at --enable-local-rust, so the other two configuration options are ignored by rustbuild.
There was a problem hiding this comment.
--local-rust-root is certainly used, since that's how we pick which binary -- but I think if you don't supply it, we will search your path. I can add some comments about that.
There was a problem hiding this comment.
Normally this is interpreted as -vv, but I'm not sure if getopts has the ability to tell us about that?
There was a problem hiding this comment.
Yeah, I think it doesn't? I should dig a bit more I guess.
There was a problem hiding this comment.
oh I guess there is optflagmulti
alexcrichton
commented
Nov 29, 2016
Hm I didn't quite see all the pieces I expected to see here. So right now if you pass |
nikomatsakis
commented
Nov 30, 2016
Right. This is what I meant by this from the PR summary: 'This does NOT implement the "copy stage0 libs to stage1" optimization described in #37929, just because that seems orthogonal to me.' Note that |
nikomatsakis
commented
Nov 30, 2016
@alexcrichton pushed one bug fix and tweaked README. I didn't address the problem of copying libraries over yet. |
nikomatsakis
commented
Nov 30, 2016
So @alexcrichton and I had some chats over IRC and we came to some conclusions:
This would mean that building with --incremental and a recent nightly as your base compiler is by default fast:
@alexcrichton do you want to hold off on landing until I do that? doesn't seem so hard. |
nikomatsakis
commented
Nov 30, 2016
On the other hand, I could just remove the check that forces |
bors
commented
Nov 30, 2016
☔ The latest upstream changes (presumably #37800) made this pull request unmergeable. Please resolve the merge conflicts. |
alexcrichton
commented
Dec 1, 2016
@nikomatsakis I'd be fine landing this ahead of time, seems like a fine optimization no matter what to unconditionally incrementally build stage0 with So in that sense, likely r=me with a rebase, but I'll take one more look. |
73eaec0 to
41a677bComparenikomatsakis
commented
Dec 1, 2016
@alexcrichton rebased and adjusted |
41a677b to
d09050fCompareThere was a problem hiding this comment.
Aha! I found out where we actually read this. Ideally we wouldn't need --local-rust-root here because --enable-local-rebuild should say "get from PATH by default".
Let's fix that bug later.
There was a problem hiding this comment.
@alexcrichton actually, I think the configure script does fetch from path by default -- I just used --local-rust-root because I have a different rustc in my path that takes precedence over rustup
There was a problem hiding this comment.
oh, but I see that bootstrap doesn't. ok.
alexcrichton
commented
Dec 1, 2016
r=me with a squash |
f4601db to
3bfdd48Comparenikomatsakis
commented
Dec 1, 2016
@bors r=alexcrichton |
bors
commented
Dec 1, 2016
📌 Commit 3bfdd48 has been approved by |
bors
commented
Dec 3, 2016
⌛ Testing commit 3bfdd48 with merge 5daf4b6... |
bors
commented
Dec 3, 2016
💔 Test failed - auto-linux-64-cargotest |
bors
commented
Dec 7, 2016
☔ The latest upstream changes (presumably #37817) made this pull request unmergeable. Please resolve the merge conflicts. |
For example: - we now support `-vv` to get very verbose output. - RUSTFLAGS is respected by `x.py` - better error messages for some cases
3bfdd48 to
83453bcComparenikomatsakis
commented
Dec 19, 2016
@bors r=acrichto |
bors
commented
Dec 19, 2016
📌 Commit 83453bc has been approved by |
bors
commented
Dec 19, 2016
⌛ Testing commit 83453bc with merge 94ae2a2... |
add preliminary support for incremental compilation to rustbuild.py This implements the integration described in #37929. It requires the use of a local nightly as your bootstrap compiler. The setup is described in `src/bootstrap/README.md`. This does NOT implement the "copy stage0 libs to stage1" optimization described in #37929, just because that seems orthogonal to me. In local testing, I do not yet see any incremental re-use when building rustc. I'm not sure why that is, more investigation needed. (For these reasons, this is not marked as fixing the relevant issue.) r? @alexcrichton -- I included one random cleanup (`Step::noop()`) that turned out to not be especially relevant. Feel free to tell me you liked it better the old way.
bors
commented
Dec 19, 2016
…e, r=nikomatsakis Correct path of incremental artifacts Per rust-lang#38072 (comment) r? @nikomatsakis
This was added in rust-lang#38072 but I can't recall why and AFAIK Cargo already handles this. This was discovered through rust-lang#42146 where passing duplicate flags was causing problems.
…rk-Simulacrum rustbuild: Remove RUSTFLAGS logic in rustc shim This was added in rust-lang#38072 but I can't recall why and AFAIK Cargo already handles this. This was discovered through rust-lang#42146 where passing duplicate flags was causing problems.
…rk-Simulacrum rustbuild: Remove RUSTFLAGS logic in rustc shim This was added in rust-lang#38072 but I can't recall why and AFAIK Cargo already handles this. This was discovered through rust-lang#42146 where passing duplicate flags was causing problems.
This implements the integration described in #37929. It requires the use of a local nightly as your bootstrap compiler. The setup is described in
src/bootstrap/README.md.This does NOT implement the "copy stage0 libs to stage1" optimization described in #37929, just because that seems orthogonal to me.
In local testing, I do not yet see any incremental re-use when building rustc. I'm not sure why that is, more investigation needed.
(For these reasons, this is not marked as fixing the relevant issue.)
r? @alexcrichton -- I included one random cleanup (
Step::noop()) that turned out to not be especially relevant. Feel free to tell me you liked it better the old way.