Skip to content

cargo is unnecessarily rebuilt on x.py dist #130018

Closed as not planned
Closed as not planned
@xry111

Description

@xry111

Run

x.py build
x.py dist

And x.py dist will rebuild cargo for no good reason (the rebuilt cargo executable is unchanged at all). Using a cargo instrumented with debug output:

the rustflags changed from
["-C", "target-cpu=raptorlake", "--cfg=windows_raw_dylib", "-Csymbol-mangling-version=v0", "-Zunstable-options", "--check-cfg=cfg(bootstrap)", "--check-cfg=cfg(parallel_compiler)", "--check-cfg=cfg(rust_analyzer)", "-Zmacro-backtrace", "-Csplit-debuginfo=off", "-Clink-args=-Wl,-z,origin", "-Clink-args=-Wl,-rpath,$ORIGIN/../lib", "-Zunstable-options"] to
["-C", "target-cpu=raptorlake", "--cfg=windows_raw_dylib", "-Csymbol-mangling-version=v0", "-Zunstable-options", "--check-cfg=cfg(bootstrap)", "--check-cfg=cfg(parallel_compiler)", "--check-cfg=cfg(rust_analyzer)", "-Zmacro-backtrace", "-Csplit-debuginfo=off", "-Clink-args=-Wl,-z,origin", "-Clink-args=-Wl,-rpath,$ORIGIN/../lib", "-Zunstable-options", "-Zon-broken-pipe=kill"]

AFAIK -Zon-broken-pipe=kill shouldn't affect code generation, thus there's no need to rebuild cargo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-cargoRelevant to the cargo team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions