Skip to content

Switch to config.toml instead of gcc-path #427

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

Merged
merged 4 commits into from
Feb 11, 2024

Conversation

GuillaumeGomez
Copy link
Member

This is the first step to support the download command.

@GuillaumeGomez GuillaumeGomez force-pushed the config-file branch 7 times, most recently from 5a8e903 to 8cd21d9 Compare February 9, 2024 16:15
pub const CONFIG_FILE: &'static str = "config.toml";

pub fn new() -> Result<Self, String> {
let content = fs::read_to_string(Self::CONFIG_FILE).map_err(|_| {
Copy link
Member

Choose a reason for hiding this comment

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

This requires config.toml to be at the root of the cg_gcc source, right? When building as part of rustc that will not work. The source directory should be assumed to be immutable, thus preventing that file to be created by either the user or the rust build system. You could add a way to configure where it will look for config.toml.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah right I forgot about that, not great... Adding a command-line argument would fix it I suppose, thanks!

@GuillaumeGomez GuillaumeGomez force-pushed the config-file branch 5 times, most recently from 5cdef40 to aac6765 Compare February 11, 2024 22:13
@antoyo antoyo merged commit 560e65c into rust-lang:master Feb 11, 2024
@GuillaumeGomez GuillaumeGomez deleted the config-file branch February 12, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants