Don't parse and reserialize toml in configure.py #112445
Labels
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Currently, configure.py has a lot of code dedicated to parsing and serializing toml: https://github.com/rust-lang/rust/blob/6959dd0ee3e8c0c11d3ea54b258dfaf24f148a49/src/bootstrap/configure.py#L382-L509
90% of this is unnecessary: when we get
--set rust.foo
as an argument, we can writerust.foo = true
directly to config.toml, without needing to parse the toml itself. That should make configure.py a lot simpler, and as a side effect it means the hack to append a profile will be valid toml again: #112281 (comment)The text was updated successfully, but these errors were encountered: