Commit graph

12 commits

Author SHA1 Message Date
Arlo Siemsen
f86b078e2d Add hash of source files in debug info
* Adds either an MD5 or SHA1 hash to the debug info.
* Adds new unstable option `-Z src-hash-algorithm` to control the hashing algorithm.
2020-04-02 14:13:19 -07:00
Chris Simpkins
cf929f77bf support LLVM globals corresponding to miri allocations 2020-03-12 09:57:05 -04:00
varkor
62838975d0 Remove unnecessary ignore-tidy-linelength 2019-04-23 11:42:14 +01:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Alex Crichton
63c471e102 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-09-27 16:53:25 -07:00
Colin Pronovost
02190f397e Make globals with private linkage unnamed. Fixes #50862. 2018-07-31 23:45:18 -04:00
Oliver Schneider
0595ff1009
Codegen tests 2018-03-08 08:34:08 +01:00
Jeremy Fitzhardinge
56a6828533 Implement --remap-path-prefix
Remove experimental -Zremap-path-prefix-from/to, and replace it with
the stabilized --remap-path-prefix=from=to variant.

This is an implementation for issue of #41555.
2018-02-22 15:13:21 -08:00
Oliver Schneider
d732da813b
Use PathBuf instead of String where applicable 2017-12-14 11:22:08 +01:00
Philip Craig
c27a82f193 Don't use remapped path when loading modules and include files 2017-09-30 16:32:45 +10:00
Michael Woerister
8ea050d89d Disable path remapping test on Windows. 2017-04-28 13:30:07 +02:00
Michael Woerister
5c62ce4a82 Make codegen test for remap-path-prefix more thorough. 2017-04-26 15:44:02 +02:00