Page MenuHomePhabricator

Reland: Use -fdebug-compilation-dir to form absolute paths in coverage mappings
AbandonedPublic

Authored by keith on Jun 3 2020, 4:02 PM.

Details

Summary

This reverts commit 62808631acceaa8b78f8ab9b407eb6b943ff5f77.

This was previously reverted because llvm-cov's -path-equivalence usage
wasn't working as expected. This does work with
-path-equivalence=.,/bar when used with -fdebug-compilation-dir .

More discussion: https://lists.llvm.org/pipermail/cfe-dev/2020-June/065668.html

Diff Detail

Event Timeline

keith created this revision.Jun 3 2020, 4:02 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 3 2020, 4:02 PM
keith updated this revision to Diff 268510.Jun 4 2020, 9:40 AM

Update relative paths to include the leading ./

This makes these remappings more analogous to lldb's source remapping, and
makes using -path-equivalence with llvm-cov more familiar.

keith edited the summary of this revision. (Show Details)Jun 4 2020, 9:43 AM
vsk accepted this revision.Jun 4 2020, 10:43 AM

Lgtm. Thanks for making the addition to the command guide!

This revision is now accepted and ready to land.Jun 4 2020, 10:43 AM
keith added a comment.Jun 4 2020, 11:10 AM

FYI I actually removed that piece this morning since I felt like since this now supports -path-equivalence=.,foo which is the "expected" behavior from lldb, that was "good enough". lmk if you want me to add it back!

vsk added a subscriber: phosek.Jun 4 2020, 12:08 PM

FYI I actually removed that piece this morning since I felt like since this now supports -path-equivalence=.,foo which is the "expected" behavior from lldb, that was "good enough". lmk if you want me to add it back!

I missed the fact that there's already some discussion of working with remote builds in the command guide. I don't think it needs to be changed.

Separately, @phosek pointed out that there might be an issue with changing the way paths work in coverage mappings based on -fdebug-prefix-map or -fdebug-compilation-dir alone. Mind holding off on landing this until we pick some way to resolve the issue?