-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
I tried the following code:
$ cargo new hello-world
$ cd hello-world
In release mode, --remap-path-prefix
works correctly:
$ RUSTFLAGS="--remap-path-prefix=$(realpath .)=src --remap-path-prefix=$CARGO_HOME=cargo-home --remap-path-prefix=$RUSTUP_HOME=rustup-home" cargo run --release -q
Hello, world!
$ strings target/release/hello-world | grep joshua | wc -l
0
but the same thing without --release (and without incremental) does not:
$ CARGO_INCREMENTAL=0 RUSTFLAGS="--remap-path-prefix=$(realpath .)=src' --remap-path-prefix=$CARGO_HOME=cargo-home --remap-path-prefix=$RUSTUP_HOME=rustup-home" cargo run
Hello, world!
$ strings target/debug/hello-world | grep joshua | wc -l
8
Note this is unrelated to #66955 because incremental is disabled.
Originally posted by @jyn514 in #75263 (comment)
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.