Skip to content

bootstrap.example.toml: use less contextual format #142636

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lolbinarycat
Copy link
Contributor

prefixing each key with its section means you don't need to scroll up 4 pages to see which section
a particular key is from.

target specific options were kept in old format since the exact section name depends on the target, so those options must now be moved to the bottom of the file.

inspired by zulip discussion

r? @workingjubilee

prefixing each key with its section means you don't
need to scroll up 4 pages to see which section
a particular key is from.

target specific options were kept in old format
since the exact section name depends on the target,
so those options must now be moved to the bottom of
the file.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jun 17, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 17, 2025

This PR modifies bootstrap.example.toml.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@rust-log-analyzer

This comment has been minimized.

@Kobzol
Copy link
Contributor

Kobzol commented Jun 17, 2025

Note that the Python part of bootstrap parses this file, so it will probably require some changes in it 🥶

Comment on lines +166 to +181
#llvm.clang = false

# Whether to enable llvm compilation warnings.
#enable-warnings = false
#llvm.enable-warnings = false

# Custom CMake defines to set when building LLVM.
#build-config = {}
#llvm.build-config = {}

# =============================================================================
# Tweaking how GCC is compiled
# =============================================================================
[gcc]
# Download GCC from CI instead of building it locally.
# Note that this will attempt to download GCC even if there are local
# modifications to the `src/gcc` submodule.
# Currently, this is only supported for the `x86_64-unknown-linux-gnu` target.
#download-ci-gcc = false
#gcc.download-ci-gcc = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forget. If we have a sequence like this:

llvm.clang = false
gcc.download-ci-gcc = false
llvm.enable-warnings = false

does that still parse correctly as toml?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, that was the one thing I was wondering about.

Copy link
Member

@workingjubilee workingjubilee Jun 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a point during the TOML spec discussions leading up to 1.0 where some of us argued we should not allow this.

@rust-log-analyzer

This comment has been minimized.

@lolbinarycat lolbinarycat force-pushed the bootstrap-example-unsection branch from fb25417 to a0158b8 Compare June 17, 2025 20:30
@rust-log-analyzer

This comment has been minimized.

@lolbinarycat lolbinarycat force-pushed the bootstrap-example-unsection branch from a0158b8 to 59ef0b2 Compare June 17, 2025 20:36
@rust-log-analyzer

This comment has been minimized.

@lolbinarycat lolbinarycat force-pushed the bootstrap-example-unsection branch from 59ef0b2 to 851fd58 Compare June 17, 2025 20:44
@rust-log-analyzer

This comment has been minimized.

@lolbinarycat lolbinarycat force-pushed the bootstrap-example-unsection branch from 851fd58 to 1d22c66 Compare June 17, 2025 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants