--remap-path-prefix broken in rustc version >= 1.46.0 #77046
Labels
C-bug
Category: This is a bug.
E-needs-bisection
Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
P-medium
Medium priority
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
When compiling a rust program with
--remap-path-prefix
in 1.46.0, (and nightlies 1.47.0, 1.48.0) the specified prefixes in the binary are unaltered. I expected them to be changed.When using 1.45.2 and 1.43.0, it works as expected.
Steps to reproduce
rustc --version
cargo new --bin foo
regex = "1"
RUSTFLAGS=--remap-path-prefix=/home/kasper=bar cargo build --release
, where/home/kasper/
is the prefix you want to change, for example your$HOME
.strings target/release/foo | grep kasper
(wherekasper
is something contained in the prefix), and see that it returns several lines.If the same steps are taken on 1.45.2, step 5 returns no results, as expected.
Notes
The crate and code example is arbitrary, and the same behavior is observed for any combination of crates.
Software versions:
The following nightly versions also fail:
The text was updated successfully, but these errors were encountered: