Skip to content

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

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

Activity

  1. added
    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
    on Jul 17, 2017
  2. Mark-Simulacrum commented on Jul 17, 2017

    @Mark-Simulacrum
    Member

    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.

  3. retep998 commented on Jul 17, 2017

    @retep998
    Contributor

    Would this be fixed by simply not using config.mk at all and having configure create config.toml instead? #40730

  4. infinity0 commented on Jul 17, 2017

    @infinity0
    ContributorAuthor

    That would probably work, yes.

  5. infinity0 commented on Jul 18, 2017

    @infinity0
    ContributorAuthor

    As an amendment, this bug does affect CFG_ENABLE_DEBUGINFO_* etc, I was grepping for the full name and didn't notice this part.

  6. added a commit that references this issue on Jul 21, 2017
  7. added a commit that references this issue on Jul 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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