Skip to content

Ability to disable build.build-dir config #15820

@kornelski

Description

@kornelski

Problem

Once build.build-dir config is set, it seems that it cannot be unset by usual ways of overriding configuration (I assume the unstable.build-dir = true is going away).

cargo b --config 'build.build-dir=false' # expected a string, but found a boolean
cargo b --config 'build.build-dir=""' # the build directory is set to an empty string
CARGO_BUILD_BUILD_DIR= cargo b # the build directory is set to an empty string

rustc bootstrap is incompatible with build-dir, and the simplest solution would be to turn it off.

Proposed Solution

Perhaps allow false as a valid value, similar to build = false in Cargo.toml. However, true doesn't make sense in this case.

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-configurationArea: cargo config files and env varsA-layoutArea: target output directory layout, naming, and organizationC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions