[cfe-dev] Absolute paths in code coverage info
Keith Smiley via cfe-dev
cfe-dev at lists.llvm.org
Tue Jun 2 14:49:18 PDT 2020
Ah actually it looks like that issue was resolved, but it was reverted a
second time for:
> There seem to be bugs in llvm-cov --path-equivalence that are causing
Chromium problems. Revert this until they are understood or fixed.
Does anyone have more context on those?
On Tue, Jun 2, 2020 at 2:27 PM Keith Smiley <keithbsmiley at gmail.com> wrote:
> Thanks for the context! I found the revert
> https://github.com/llvm/llvm-project/commit/62808631acceaa8b78f8ab9b407eb6b943ff5f77 and
> it looks like it was caused by a small test issue. I'm a bit surprised by
> the justification for it since I would expect relying on the specific
> directory of the test to be safe, but I think I can make it work and
> Keith Smiley
> On Tue, Jun 2, 2020 at 10:44 AM Vedant Kumar <vsk at apple.com> wrote:
>> A problem that absolute paths solve in local builds is dealing with a
>> changing compilation directory - this can result in two different files
>> being referenced by the same relative path.
>> There was a promising attempt to make this work with remote builds. The
>> idea was to have the coverage mapping logic respect a fixed compilation
>> directory option (https://reviews.llvm.org/D68733), i.e. the paths
>> embedded in the coverage mapping should be rooted at the
>> -fdebug-compilation-dir <path>. It looks like the patch was reverted, but
>> (as far as I know) there aren’t any fundamental issues with it.
>> On Jun 2, 2020, at 9:57 AM, Keith Smiley via cfe-dev <
>> cfe-dev at lists.llvm.org> wrote:
>> Hey everyone,
>> Currently when generating code coverage by passing
>> `-fprofile-instr-generate -fcoverage-mapping` to clang, the __LLVM_COV /
>> __llvm_covmap section ends up containing absolute paths to the source files
>> being compiled. This causes issues when producing coverage info with remote
>> builds where the absolute paths to the source files may differ between
>> llvm-cov has a `-path-equivalence` flag in order for you to remap a
>> single absolute path from the coverage info which definitely helps, but it
>> doesn't solve this entirely for the cases where you have multiple paths
>> that need remapping, or you're using another tool such as, Xcode's code
>> coverage UI, that doesn't support this kind of path remapping.
>> I'm wondering if it has been discussed, or how feasible it would be, for
>> me to remove the necessity for absolute paths in this info.
>> Keith Smiley
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev