Skip to content

Commit eeacbee

Browse files
authored
Rollup merge of rust-lang#63342 - ehuss:remap-path-dep-info, r=alexcrichton
Don't use remap-path-prefix in dep-info files. This changes it so that dep-info files do not use remapped paths. Having remapped paths causes problems with Cargo because if you remap to a nonexistent path (like `/rustc/$HASH` which rustc distributions do), then Cargo's change tracking thinks the files don't exist and will always rebuild. I don't actually know if this is a good idea. I think it makes sense, but I do not know what the exact requirements are for reproducible builds. I consider these files separate from the binary artifacts generated, and as a build-system helper, so it seems reasonable to me. I'm also not sure if this needs a test. I'll definitely add one on the cargo side if this is merged. Closes rust-lang#63329
2 parents 76938ab + 04eee2e commit eeacbee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_interface/passes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ fn write_out_deps(compiler: &Compiler, outputs: &OutputFilenames, out_filenames:
661661
.iter()
662662
.filter(|fmap| fmap.is_real_file())
663663
.filter(|fmap| !fmap.is_imported())
664-
.map(|fmap| escape_dep_filename(&fmap.name))
664+
.map(|fmap| escape_dep_filename(&fmap.unmapped_path.as_ref().unwrap_or(&fmap.name)))
665665
.collect();
666666

667667
if sess.binary_dep_depinfo() {

0 commit comments

Comments
 (0)