diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-04-19 17:54:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-19 17:54:44 +0200 |
| commit | 0820e31a00c02cdefe2e47a5b6c1df27ad531f69 (patch) | |
| tree | f61ad5139b9eb88c302e6ccac183f3a1b83f5090 /src/bootstrap/configure.py | |
| parent | b59658c990557e654fac9fd80902f9d6891a665d (diff) | |
| parent | 8a9668d8e8e0f6a6c5657c3c4ec86367816395cf (diff) | |
| download | rust-0820e31a00c02cdefe2e47a5b6c1df27ad531f69.tar.gz rust-0820e31a00c02cdefe2e47a5b6c1df27ad531f69.zip | |
Rollup merge of #110541 - jyn514:fix-configure, r=ozkanonur
Fix various configure bugs Fixes https://github.com/rust-lang/rust/issues/107050. Fixes https://github.com/rust-lang/rust/issues/108928. Closes https://github.com/rust-lang/rust/pull/108641. I recommend reading this commit-by-commit to see the commit descriptions, but the code changes are small. This also changes the README to suggest `configure` instead of `printf`, as well as a few other cleanups described in the commit message.
Diffstat (limited to 'src/bootstrap/configure.py')
| -rwxr-xr-x | src/bootstrap/configure.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py index 782bb6cf36f..f95a97518c5 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -417,6 +417,8 @@ def parse_example_config(known_args, config): # Avoid using quotes unless it's necessary. targets[target][0] = targets[target][0].replace("x86_64-unknown-linux-gnu", "'{}'".format(target) if "." in target else target) + if 'profile' not in config: + set('profile', 'user', config) configure_file(sections, top_level_keys, targets, config) return section_order, sections, targets @@ -475,7 +477,7 @@ def configure_section(lines, config): def configure_top_level_key(lines, top_level_key, value): for i, line in enumerate(lines): if line.startswith('#' + top_level_key + ' = ') or line.startswith(top_level_key + ' = '): - lines[i] = "{} = {}".format(top_level_key, value) + lines[i] = "{} = {}".format(top_level_key, to_toml(value)) return raise RuntimeError("failed to find config line for {}".format(top_level_key)) |
