Skip to content

failing to build individual tools via x.py #71307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tshepang opened this issue Apr 18, 2020 · 4 comments · Fixed by #71346
Closed

failing to build individual tools via x.py #71307

tshepang opened this issue Apr 18, 2020 · 4 comments · Fixed by #71346
Assignees
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@tshepang
Copy link
Member

tshepang commented Apr 18, 2020

Running ./x.py build results in all tools built, even though I asked for one, using the following config.toml:

[build]
compiler-docs = true
extended = true
tools = ["rustfmt"]

This issue has been assigned to @mati865 via this comment.

@jonas-schievink jonas-schievink added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. labels Apr 18, 2020
@Mark-Simulacrum
Copy link
Member

Hm, so this was originally only added for the x.py install use case (it's even somewhat explicitly specified as such in the docs above tools = in config.toml.example).

Installs chosen set of extended tools if extended = true. By default builds all.
If chosen tool failed to build the installation fails. If extended = false, this
option is ignored.

Did you actually want this to work? (Or just pointing out an inconsistency?)

Generally speaking x.py build without arguments is essentially never what you really want IMO, it's too broad -- I would recommend always passing a specific thing to build, in this case it looks like you want src/tools/rustfmt as the flag.

@tshepang
Copy link
Member Author

tshepang commented Apr 19, 2020

I expected only the specified to get built, but I guess I also glossed over the Install word.
Needs an update perhaps... it's not so clear. Maybe following would be better:

Note that all tools are build, but only the selected tools would be installed.

Replacing

By default builds all.

@tshepang
Copy link
Member Author

My confusion could also be coming from this snippet, which talks about building

# Enable a build of the extended Rust tool set which is not only the compiler
# but also tools such as Cargo. This will also produce "combined installers"
# which are used to install Rust and Cargo together. This is disabled by
# default. The `tools` option (immediately below) specifies which tools should
# be built if `extended = true`.
#extended = false

@mati865
Copy link
Contributor

mati865 commented Apr 19, 2020

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants