You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, rustc records its current directory and each literal pathname passed to it in the debug information. This is usually what we want.
However, if rustc is being used in build infrastructure where the actual directory and pathnames differ from the "canonical" ones, it would be useful to be able to remap the pathnames into the canonical form in the debug info, so that they're useful for debugging.
gcc and clang have the -fdebug-prefix-map=old=new option, which matches each source path against the old prefix and remaps it to new in the debug info (non-matching paths are unchanged). I think we can copy this design, with a -C debug-prefix-map=<old>=<new> (though I'm not thrilled that it can't deal with paths with an = in them).
The text was updated successfully, but these errors were encountered:
Right now,
rustc
records its current directory and each literal pathname passed to it in the debug information. This is usually what we want.However, if
rustc
is being used in build infrastructure where the actual directory and pathnames differ from the "canonical" ones, it would be useful to be able to remap the pathnames into the canonical form in the debug info, so that they're useful for debugging.gcc and clang have the
-fdebug-prefix-map=old=new
option, which matches each source path against theold
prefix and remaps it tonew
in the debug info (non-matching paths are unchanged). I think we can copy this design, with a-C debug-prefix-map=<old>=<new>
(though I'm not thrilled that it can't deal with paths with an=
in them).The text was updated successfully, but these errors were encountered: