Skip to content

rustbuild: default values from config.mk now effectively override config.toml #43295

Closed
@infinity0

Description

@infinity0

#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

CFG_RELEASE_CHANNEL  := dev

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 to x.py useless. For example even if I have

[rust]
channel = "stable"

and run

$ ./x.py build --config myconfig.toml

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 not CFG_ENABLE_DEBUGINFO_* as bootstrap/config.rs does not appear to read them.

cc @Mark-Simulacrum

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.P-mediumMedium priorityT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions