Skip to content

Unable to emit llvm-bc when CARGO_INCREMENTAL is set #62217

@jaybutera

Description

@jaybutera

When building with the rustc argument to emit an llvm bc file
cargo rustc -v -- --emit llvm-bc

Cargo builds successfully but prints the warning
warning: ignoring emit path because multiple .bc files were produced

Doing a recursive search for all *.bc files from root, I can see that the bc file I'm wanting was not generated, but there are a lot of bc files in ./target/debug/incremental/.

So I turned off incremental building export CARGO_INCREMENTAL=0 and cleared the target directory, then ran the build command again. This time the correct bc file is generated in ./target/debug/deps

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationT-compilerRelevant to the compiler 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