Rollup merge of #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 #63329
This commit is contained in:
Mazdak Farrokhzad 2019-08-08 16:33:39 +02:00 committed by GitHub
commit eeacbee580
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -661,7 +661,7 @@ fn write_out_deps(compiler: &Compiler, outputs: &OutputFilenames, out_filenames:
.iter()
.filter(|fmap| fmap.is_real_file())
.filter(|fmap| !fmap.is_imported())
.map(|fmap| escape_dep_filename(&fmap.name))
.map(|fmap| escape_dep_filename(&fmap.unmapped_path.as_ref().unwrap_or(&fmap.name)))
.collect();
if sess.binary_dep_depinfo() {