Cleanup option parsing and config.toml.example
- Add an assertion that `link-shared = true` when `thin-lto = true`.
Previously, link-shared would be silently overwritten.
- Get rid of `Option<bool>` in bootstrap/config.rs. Set defaults
immediately instead of delaying until later in bootstrap. This makes
it easier to find what the default value is.
- Remove redundant `config.x = false` when the default was already false
- Set defaults for `bindir` in `default_opts()` instead of `parse()`
- Update `download-ci-llvm = if-supported` option to match bootstrap.py
- Remove redundant check for link_shared. Previously, it was checked twice.
- Update various options in config.toml.example to their defaults.
Previously, some options showed an example value instead of the
default value.
- Fix incorrect defaults in config.toml.example
+ `use-libcxx` defaults to false
+ Add missing `check-stage = 0`
+ Update several defaults to be conditional (e.g. `if incremental { 10 } else { 100 }`)
- Remove redundant defaults in prose
- Use the same comment for the default and target-dependent `musl-root`
- Fix typos
- Link to `cc_detect` for `cc` and `cxx`, since the logic is ... complicated.
- Update more defaults to better reflect how they actually get set
- Remove ignored `gpg-password-file` option
This stopped being used in
7704d35acc
,
but was never removed from config.toml.
- Remove unused flags from `config.toml`
+ Disallow `infodir` and `localstatedir` in `config.toml`
+ Allow the flags in `./configure`, but give a warning that they will be
ignored.
+ Fix incorrect comment that `datadir` will be ignored.
Example output:
```
$ ./configure --set install.infodir=xxx
configure: processing command line
configure:
configure: install.infodir := xxx
configure: build.configure-args := ['--set', 'install.infodir=xxx']
warning: infodir will be ignored
configure:
configure: writing `config.toml` in current directory
configure:
configure: run `python /home/joshua/rustc3/x.py --help`
configure:
```
- Update CHANGELOG
- Add "as an example" where appropriate
- Link to an issue instead of to ephemeral chats
This commit is contained in:
parent
8cd7d86ce2
commit
28e83a4716
6 changed files with 106 additions and 96 deletions
|
@ -439,7 +439,12 @@ def configure_section(lines, config):
|
|||
lines[i] = "{} = {}".format(key, to_toml(value))
|
||||
break
|
||||
if not found:
|
||||
raise RuntimeError("failed to find config line for {}".format(key))
|
||||
# These are used by rpm, but aren't accepted by x.py.
|
||||
# Give a warning that they're ignored, but not a hard error.
|
||||
if key in ["infodir", "localstatedir"]:
|
||||
print("warning: {} will be ignored".format(key))
|
||||
else:
|
||||
raise RuntimeError("failed to find config line for {}".format(key))
|
||||
|
||||
|
||||
for section_key in config:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue