Closed
Description
On Rust 1.50.0 --remap-path-prefix is behaving weirdly
On 1.49.0 it works as expected and gives a path relative to what is passed
$ rustc --version
rustc 1.49.0 (e1884a8e3 2020-12-29)
$ rustc -g main.rs -o bar/main --remap-path-prefix='/home/remi/foo2/='
$ llvm-dwarfdump bar/main | grep DW_AT_decl_file | grep 'main.rs'
DW_AT_decl_file ("main.rs")
On 1.50.0 it does not work as expected, and gives a path to a non-existent file
$ rustc --version
rustc 1.50.0 (cb75ad5db 2021-02-10)
$ rustc -g main.rs -o bar/main --remap-path-prefix='/home/remi/foo2/='
$ llvm-dwarfdump bar/main | grep DW_AT_decl_file | grep 'main.rs'
DW_AT_decl_file ("bar/main.rs")
In terms of prioritization of this issue, I'd like to make a plea for the importance of it, because at first glance it seems not a huge deal but it causes us huge problems.
We need this --remap-path-prefix
to work so that the build artifacts are reproducible from machine to machine and for our distributed build cache to work successfully, and we also need the debugging-symbols paths to be correct so debuggers work correctly.