This is an archive of the discontinued LLVM Phabricator instance.

[Coverage] Support overriding compilation directory
ClosedPublic

Authored by phosek on Apr 9 2021, 2:32 PM.

Details

Summary

When making compilation relocatable, for example in distributed
compilation scenarios, we want to set compilation dir to a relative
value like . but this presents a problem when generating reports
because if the file path is relative as well, for example .., you
may end up writing files outside of the output directory.

This change introduces a flag that allows overriding the compilation
directory that's stored inside the profile with a different value that
is absolute.

Diff Detail

Event Timeline

phosek created this revision.Apr 9 2021, 2:32 PM
phosek requested review of this revision.Apr 9 2021, 2:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 9 2021, 2:32 PM
phosek updated this revision to Diff 336566.Apr 9 2021, 2:33 PM
phosek updated this revision to Diff 336572.Apr 9 2021, 3:34 PM

Can you add a test case for the llvm-cov new flag? Otherwise looks good to me.

tunz added a subscriber: tunz.Apr 12 2021, 12:02 PM

Can you add a test case for the llvm-cov new flag? Otherwise looks good to me.

Test added, is this OK to land?

vsk accepted this revision.Apr 22 2021, 12:13 PM

Thanks, lgtm.

This revision is now accepted and ready to land.Apr 22 2021, 12:13 PM
zequanwu accepted this revision.Apr 22 2021, 3:16 PM

lgtm.

Any update? Do you plan to land those two patches?

phosek updated this revision to Diff 344571.May 11 2021, 3:25 PM
This revision was landed with ongoing or failed builds.May 11 2021, 3:27 PM
This revision was automatically updated to reflect the committed changes.