Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc: Tweak filenames encoded into metadata #54626

Merged
merged 1 commit into from
Oct 26, 2018

Commits on Sep 27, 2018

  1. rustc: Tweak filenames encoded into metadata

    This commit is a fix for rust-lang#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 rust-lang#54408
    alexcrichton committed Sep 27, 2018
    Configuration menu
    Copy the full SHA
    63c471e View commit details
    Browse the repository at this point in the history