Skip to content

Cargo build recompiles when using rustc -- -Z no-trans #3204

Closed
@antoyo

Description

@antoyo

Hello.

When I use cargo rustc -- -Z -no-trans, the following cargo build will recompile even thought I did not changed the source code.

Here is the commands that I ran:

$ cargo build
   Compiling test v0.1.0 (file:///path/to/project)
    Finished debug [unoptimized + debuginfo] target(s) in 0.40 secs
$ cargo rustc -- -Z no-trans
   Compiling test v0.1.0 (file:///path/to/project)
    Finished debug [unoptimized + debuginfo] target(s) in 0.17 secs
$ cargo build
   Compiling test v0.1.0 (file:///path/to/project)
    Finished debug [unoptimized + debuginfo] target(s) in 0.40 secs

The second cargo build should not recompile the project.

Thanks to fix this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cachingArea: caching of dependencies, repositories, and build artifactsA-rebuild-detectionArea: rebuild detection and fingerprintingC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-rustc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions