Option to pass flags to rustc
while bootstrapping using a file
#135800
Labels
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
F-check-cfg
--check-cfg
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
When bootstrapping
rustc
invocations can be rather large. For example this is an invocation I wanted to debug today (~10.9 KiB):This causes shells to melt (good luck editing a command when it doesn't render), which is very annoying when you want to change something about the command, or even simply run it through
gdb
(NB: you need to insertgdb --args
in between the env vars and the rest of the command, which is mostly impossible when the command doesn't render!!).One of the things I'd wish for is a way for
cargo
to passcheck-cfg
without repeating--check-cfg
~139 times. Something like--check-cfg "all(cfg(uwu), cfg(owo))"
(or"cfg(uwu); cfg(owo)"
) maybe?The second thing is for bootstrap to have an option (cli, config) to pass options to the
rustc
binary via a file. Note thatrustc
supports reading command line arguments from a file with@file
:Bootstrap could create a file in
/tmp
or in./build/..
with the arguments and pass that torustc
. That would make it much easier to re-run commands run by bootstrap, which is sometimes useful when debugging.cc @jieyouxu
The text was updated successfully, but these errors were encountered: