Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upmk: Switch rustbuild to the default build system #37817
Conversation
rust-highfive
assigned
aturon
Nov 16, 2016
This comment has been minimized.
This comment has been minimized.
|
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
|
r? @brson Note that this shouldn't be r+'d yet as I'd like to wait for appveyor/Travis to go green (trying to run all the builders there). Also if there's any more requests for documentation anywhere, I'd be more than happy to oblige! |
rust-highfive
assigned
brson
and unassigned
aturon
Nov 16, 2016
petrochenkov
reviewed
Nov 16, 2016
| To learn more about the driver and top-level targets, you can execute: | ||
|
|
||
| ```sh | ||
| python x.py --help |
This comment has been minimized.
This comment has been minimized.
petrochenkov
Nov 16, 2016
Contributor
I run x.py --help and it starts downloading something big from the internet instead of showing help.
I don't think this is an appropriate behavior.
This comment has been minimized.
This comment has been minimized.
petrochenkov
requested changes
Nov 16, 2016
|
Fix #37305 before merging |
petrochenkov
reviewed
Nov 17, 2016
| of the compiler. You can execute it as: | ||
|
|
||
| ```sh | ||
| python x.py build |
This comment has been minimized.
This comment has been minimized.
petrochenkov
Nov 17, 2016
•
Contributor
Is bootstrap python3-compatible, btw? In case python defaults to 3. This is probably worth mentioning.
(Or build fails in some other way if python == python3, but python2 is still available? I don't remember exactly.)
This comment has been minimized.
This comment has been minimized.
xen0n
Nov 17, 2016
Contributor
Yes all the Python code in Rust repo is Py3k-compatible AFAIK, which is not so much btw. The whole Python 2-only thing in README is outdated actually.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
alexcrichton
Nov 17, 2016
Author
Member
AFAIK bootstrap.py is fully compatible, and then later version detection happens in rustbuild itself.
petrochenkov
reviewed
Nov 17, 2016
| warn "the makefile-based build system is deprecated in favor of rustbuild" | ||
| msg "" | ||
| msg "It is recommended you avoid passing --disable-rustbuild to get your" | ||
| msg "build working as the makefiles will be deleted on 2016-01-02. If you" |
This comment has been minimized.
This comment has been minimized.
petrochenkov
Nov 17, 2016
Contributor
Sorry for a silly question, but is the date in standard format (2 January) or in Freedom Units (1 February)?.
This comment has been minimized.
This comment has been minimized.
cuviper
Nov 17, 2016
Member
I just commented on the internals thread -- I think it should actually be February 2nd.
This comment has been minimized.
This comment has been minimized.
petrochenkov
reviewed
Nov 17, 2016
| //! to execute each in sequence. Each time rustbuild is invoked, it will simply | ||
| //! iterate through this list of steps and execute each serially in turn. | ||
| //! Rustbuild relies in each step internally being incremental and also | ||
| //! internally parallelizing. |
This comment has been minimized.
This comment has been minimized.
petrochenkov
Nov 17, 2016
Contributor
Could you document explicit parallelizing with -jN somewhere as well?
alexcrichton
force-pushed the
alexcrichton:rustbuild-default
branch
from
bd5bab4
to
6b11d6a
Nov 17, 2016
cuviper
reviewed
Nov 17, 2016
| warn "the makefile-based build system is deprecated in favor of rustbuild" | ||
| msg "" | ||
| msg "It is recommended you avoid passing --disable-rustbuild to get your" | ||
| msg "build working as the makefiles will be deleted on 2016-02-02. If you" |
This comment has been minimized.
This comment has been minimized.
retep998
reviewed
Nov 17, 2016
| python x.py build | ||
| ``` | ||
|
|
||
| If you're on a Unix-based system, you can also use the shorter version: |
This comment has been minimized.
This comment has been minimized.
retep998
Nov 17, 2016
Member
Technically you can also use a different short version on Windows if you have .py files associated with Python. x.py build in cmd and .\x.py build in powershell.
This comment has been minimized.
This comment has been minimized.
retep998
reviewed
Nov 17, 2016
|
|
||
| ```sh | ||
| $ ./configure | ||
| $ make && make install | ||
| $ python x.py build |
This comment has been minimized.
This comment has been minimized.
retep998
Nov 17, 2016
Member
This prompt is supposed to be cmd.exe according to the above paragraph, so using $ is incorrect here.
pitdicker
reviewed
Nov 17, 2016
| questions on the build system internals, try asking in | ||
| [`#rust-internals`][pound-rust-internals]. | ||
| The build system lives in [the `src/bootstrap` directory][bootstrap] in the | ||
| project root. Our build system its itself written in Rust and is based on Cargo |
This comment has been minimized.
This comment has been minimized.
pitdicker
reviewed
Nov 17, 2016
| //! | ||
| //! ## Architecture | ||
| //! | ||
| //! Although this build system defers most of the compilcated logic to Cargo |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
pitdicker
reviewed
Nov 17, 2016
| // That logic is all defined in the `native` module so we just delegate to | ||
| // the relevant function there. The argument to the closure passed to `run` | ||
| // is a `Step` (defined below) which encapsulates information like the | ||
| // stage, host, target, etc. |
This comment has been minimized.
This comment has been minimized.
pitdicker
reviewed
Nov 17, 2016
| //! | ||
| //! Although this build system defers most of the compilcated logic to Cargo | ||
| //! itself, it still needs to maintain a list of targets and dependencies which | ||
| //! it can itself perform. Rustbuild is comprised of of a list of rules with |
This comment has been minimized.
This comment has been minimized.
pitdicker
Nov 17, 2016
Contributor
*perform on. Rustbuild is made up of
Just a suggestion 'of of' reads a bit difficult
pitdicker
reviewed
Nov 17, 2016
| //! to execute each in sequence. Each time rustbuild is invoked, it will simply | ||
| //! iterate through this list of steps and execute each serially in turn. | ||
| //! Rustbuild relies in each step internally being incremental and also | ||
| //! internally parallelizing. |
This comment has been minimized.
This comment has been minimized.
pitdicker
Nov 17, 2016
Contributor
*For each step Rustbuild relies on the step to be internally incremental and also to be internally parallelizing.
alexcrichton
force-pushed the
alexcrichton:rustbuild-default
branch
2 times, most recently
from
8204cb4
to
b92e513
Nov 17, 2016
This comment has been minimized.
This comment has been minimized.
|
@petrochenkov can you elaborate on why you think #37305 is a blocker for landing this PR? I unfortunately don't see any path forward to solving it, so any opinions on how to solve it would also be greatly appreciated! |
petrochenkov
referenced this pull request
Nov 17, 2016
Closed
bootstrap.py --help starts with downloading #37305
alexcrichton
force-pushed the
alexcrichton:rustbuild-default
branch
from
b92e513
to
b781dec
Nov 17, 2016
alexcrichton
referenced this pull request
Nov 18, 2016
Closed
Rustbuild on 32-bit MSVC fails run-make tests on AppVeyor #37858
alexcrichton
force-pushed the
alexcrichton:rustbuild-default
branch
4 times, most recently
from
d5bfc7c
to
3a66312
Nov 18, 2016
alexcrichton
force-pushed the
alexcrichton:rustbuild-default
branch
from
76f9e9e
to
4755f95
Dec 5, 2016
This comment has been minimized.
This comment has been minimized.
|
@bors: r=brson |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Dec 5, 2016
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
force-pushed the
alexcrichton:rustbuild-default
branch
from
4755f95
to
fd183a2
Dec 7, 2016
alexcrichton
force-pushed the
alexcrichton:rustbuild-default
branch
from
fd183a2
to
0e272de
Dec 7, 2016
This comment has been minimized.
This comment has been minimized.
|
@bors: r=brson |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
|
bors
added a commit
that referenced
this pull request
Dec 7, 2016
This comment has been minimized.
This comment has been minimized.
bors
merged commit 0e272de
into
rust-lang:master
Dec 7, 2016
bors
referenced this pull request
Dec 7, 2016
Merged
add preliminary support for incremental compilation to rustbuild.py #38072
This comment has been minimized.
This comment has been minimized.
|
It looks like Travis started failing everything after this pull request merged. |
alexcrichton commentedNov 16, 2016
•
edited
This commit switches the default build system for Rust from the makefiles to
rustbuild. The rustbuild build system has been in development for almost a year
now and has become quite mature over time. This commit is an implementation of
the proposal on internals which slates deletion of the makefiles on
2017-02-02.
This commit also updates various documentation in
README.md,CONTRIBUTING.md,src/bootstrap/README.md, and throughout the source code ofrustbuild itself.