rust/src/librustc_metadata
bors bf962e2552 Auto merge of #54626 - alexcrichton:dwarf-generics, r=michaelwoerister
rustc: Tweak filenames encoded into metadata

This commit is a fix for #54408 where on nightly right now whenever
generics are inlined the path name listed for the inlined function's
debuginfo is a relative path to the cwd, which surely doesn't exist!
Previously on beta/stable the debuginfo mentioned an absolute path which
still didn't exist, but more predictably didn't exist.

The change between stable/nightly is that nightly is now compiled with
`--remap-path-prefix` to give a deterministic prefix to all
rustc-generated paths in debuginfo. By using `--remap-path-prefix` the
previous logic would recognize that the cwd was remapped, causing the
original relative path name of the standard library to get emitted. If
`--remap-path-prefix` *wasn't* passed in then the logic would create an
absolute path name and then create a new source file entry.

The fix in this commit is to apply the "recreate the source file entry
with an absolute path" logic a bit more aggresively. If the source
file's name was remapped then we don't touch it, but otherwise we always
take the working dir (which may have been remapped) and then join it to
the file to ensure that we process all relative file names as well.

The end result is that the standard library should have an absolute path
for all file names in debuginfo (using our `--remap-path-prefix`
argument) as it does on stable after this patch.

Closes #54408
2018-10-26 14:30:26 +00:00
..
build.rs rustc: Add some build scripts for librustc crates 2017-07-22 22:04:13 -07:00
Cargo.toml Move validate_crate_name to rustc_metadata 2018-08-03 11:09:02 -06:00
creader.rs Deprecate the FxHashMap() and FxHashSet() constructor function hack 2018-10-19 14:34:44 +02:00
cstore.rs Prefer Default::default over FxHash*::default in struct constructors 2018-10-19 14:34:44 +02:00
cstore_impl.rs fix typos in various places 2018-10-23 15:56:25 +02:00
decoder.rs Only promote calls to #[rustc_promotable] const fns 2018-10-03 10:07:05 +02:00
diagnostics.rs Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
dynamic_lib.rs rustc_metadata: test loading atoi instead of cos 2018-07-26 17:20:02 -07:00
encoder.rs Auto merge of #54626 - alexcrichton:dwarf-generics, r=michaelwoerister 2018-10-26 14:30:26 +00:00
foreign_modules.rs ItemKind 2018-07-16 15:09:17 +02:00
index.rs Make opaque::Encoder append-only and make it infallible 2018-06-27 11:43:15 +02:00
index_builder.rs Replace uses of DepGraph.in_ignore with DepGraph.with_ignore 2018-01-09 18:35:50 +01:00
isolated_encoder.rs Remove HIR inlining 2018-04-19 20:33:18 -04:00
lib.rs Bump to 1.31.0 and bootstrap from 1.30 beta 2018-09-27 20:52:53 -07:00
link_args.rs ItemKind 2018-07-16 15:09:17 +02:00
locator.rs Auto merge of #55014 - ljedrz:lazyboye_unwraps, r=matthewjasper 2018-10-20 11:22:48 +00:00
native_libs.rs Deprecate the FxHashMap() and FxHashSet() constructor function hack 2018-10-19 14:34:44 +02:00
schema.rs Add an is_marker flag to TraitDef 2018-09-19 22:31:30 -07:00