-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
rustbuild: default values from config.mk now effectively override config.toml #43295
Comments
I'm going to mark as P-medium, cc @alexcrichton and @aidanhs. I think this should hopefully resolve to merging the defaults in before we parse command line params. Not sure if I'll have time to investigate in the short term, though, but certainly within a few days I hope. |
Would this be fixed by simply not using |
That would probably work, yes. |
As an amendment, this bug does affect |
configure: allow distros to disable debuginfo-only-std This allows builders to generate debugging information for everything, even in a stable release build. This is useful for distros like Fedora (already carrying a [similar patch](https://src.fedoraproject.org/cgit/rpms/rust.git/tree/rust-1.16.0-configure-no-override.patch)) and Debian that automatically put all debuginfo in separate "debug symbol" packages. This commit preserves the default behaviour of switching these on when a non-dev channel is selected, but allows the user to override this via the `./configure` command line. In theory, one could also do this via `bootstrap/config.toml` but it doesn't work currently due to rust-lang#43295.
configure: allow distros to disable debuginfo-only-std This allows builders to generate debugging information for everything, even in a stable release build. This is useful for distros like Fedora (already carrying a [similar patch](https://src.fedoraproject.org/cgit/rpms/rust.git/tree/rust-1.16.0-configure-no-override.patch)) and Debian that automatically put all debuginfo in separate "debug symbol" packages. This commit preserves the default behaviour of switching these on when a non-dev channel is selected, but allows the user to override this via the `./configure` command line. In theory, one could also do this via `bootstrap/config.toml` but it doesn't work currently due to rust-lang#43295.
…crum rustbuild: Rewrite the configure script in Python This commit rewrites our ancient `./configure` script from shell into Python. The impetus for this change is to remove `config.mk` which is just a vestige of the old makefile build system at this point. Instead all configuration is now solely done through `config.toml`. The python script allows us to more flexibly program (aka we can use loops easily) and create a `config.toml` which is based off `config.toml.example`. This way we can preserve comments and munge various values as we see fit. It is intended that the configure script here is a drop-in replacement for the previous configure script, no functional change is intended. Also note that the rationale for this is also because our build system requires Python, so having a python script a bit earlier shouldn't cause too many problems. Closes #40730 Closes #43295 Closes #42255 Closes #38058 Closes #32176
…crum rustbuild: Rewrite the configure script in Python This commit rewrites our ancient `./configure` script from shell into Python. The impetus for this change is to remove `config.mk` which is just a vestige of the old makefile build system at this point. Instead all configuration is now solely done through `config.toml`. The python script allows us to more flexibly program (aka we can use loops easily) and create a `config.toml` which is based off `config.toml.example`. This way we can preserve comments and munge various values as we see fit. It is intended that the configure script here is a drop-in replacement for the previous configure script, no functional change is intended. Also note that the rationale for this is also because our build system requires Python, so having a python script a bit earlier shouldn't cause too many problems. Closes #40730 Closes #43295 Closes #42255 Closes #38058 Closes #32176
#42543 was fixed by unconditionally reading config.mk. However, sometimes this is populated by default values that the user did not give on the command line, for example
when running from a location with a
.git
subdirectory (such as the Debian rustc git repo). This has the effect of rendering the corresponding command-line flags tox.py
useless. For example even if I haveand run
this will get ignored and the value from
config.mk
(which I did not set) takes precedence.I can work around this by explicitly passing
--release-channel
to./configure
but this behaviour does not help rust's overall goal of eventually phasing out this file.Other flags affected include possibly
CFG_PREFIX
, but probably notCFG_ENABLE_DEBUGINFO_*
asbootstrap/config.rs
does not appear to read them.cc @Mark-Simulacrum
The text was updated successfully, but these errors were encountered: