rust/src/libsyntax
bors 18f28719ef Auto merge of #34187 - luser:extern-crate-abspaths, r=michaelwoerister
Add an abs_path member to FileMap, use it when writing debug info.

Fixes #34179.

When items are inlined from extern crates, the filename in the debug info
is taken from the FileMap that's serialized in the rlib metadata.
Currently this is just FileMap.name, which is whatever path is passed to rustc.
Since libcore and libstd are built by invoking rustc with relative paths,
they wind up with relative paths in the rlib, and when linked into a binary
the debug info uses relative paths for the names, but since the compilation
directory for the final binary, tools trying to read source filenames
will wind up with bad paths. We noticed this in Firefox with source
filenames from libcore/libstd having bad paths.

This change stores an absolute path in FileMap.abs_path, and uses that
if available for writing debug info. This is not going to magically make
debuggers able to find the source, but it will at least provide sensible
paths.
2016-06-16 12:13:25 -07:00
..
diagnostics replace fileline_{help,note} with {help,note} 2016-05-02 11:49:23 -04:00
errors Add an abs_path member to FileMap, use it when writing debug info. 2016-06-16 18:08:46 +01:00
ext Auto merge of #34187 - luser:extern-crate-abspaths, r=michaelwoerister 2016-06-16 12:13:25 -07:00
parse Add an abs_path member to FileMap, use it when writing debug info. 2016-06-16 18:08:46 +01:00
print prefer if let to match with None => () arm in some places 2016-06-15 08:13:10 -07:00
util Auto merge of #34187 - luser:extern-crate-abspaths, r=michaelwoerister 2016-06-16 12:13:25 -07:00
abi.rs [breaking-change] don't glob import/export syntax::abi enum variants 2016-02-11 12:34:48 +01:00
ast.rs Remove last traces of identifier hygiene from HIR 2016-06-11 00:12:39 +03:00
attr.rs Add and use HasAttrs trait 2016-05-26 23:23:01 +00:00
Cargo.toml rustbuild: Fix dist for non-host targets 2016-04-01 10:18:36 -07:00
codemap.rs Add an abs_path member to FileMap, use it when writing debug info. 2016-06-16 18:08:46 +01:00
config.rs Auto merge of #34216 - jseyfried:nested_cfg_attr, r=nrc 2016-06-16 03:49:55 -07:00
entry.rs [breaking-change] don't glob export ast::Item_ variants 2016-02-11 12:34:48 +01:00
feature_gate.rs Respect #[rustc_inherit_overflow_checks] in mir::build and trans. 2016-06-05 14:41:03 +03:00
fold.rs Rollup merge of #33644 - petrochenkov:selfast, r=nrc 2016-05-27 09:57:11 +05:30
lib.rs Nit: use Range::contains 2016-05-02 11:49:25 -04:00
ptr.rs Remove some old code from libsyntax 2016-04-24 21:04:09 +03:00
show_span.rs use structured errors 2015-12-30 14:27:59 +13:00
std_inject.rs Refactor away the prelude injection pass 2016-06-07 00:31:42 +00:00
str.rs
test.rs Strip #[test] nodes during cfg processing on non-test builds. 2016-06-11 03:13:44 +00:00
visit.rs Visit statement and expression attributes 2016-06-10 10:38:11 +00:00