This is an archive of the discontinued LLVM Phabricator instance.

Fix linker option for -fprofile-arcs -ftest-coverage
ClosedPublic

Authored by jessicah on Nov 6 2018, 7:19 PM.

Details

Summary

Linux toolchain accidentally added "-ullvm_runtime_variable" when "-fprofile-arcs -ftest-coverage", this is not added when "--coverage" option is used.
Using "-u
llvm_runtime_variable" generates an empty default.profraw file while an application built with "-fprofile-arcs -ftest-coverage" is running.

Diff Detail

Repository
rC Clang

Event Timeline

jessicah created this revision.Nov 6 2018, 7:19 PM
vsk added a subscriber: vsk.

Thanks for the patch. Would you mind uploading a diff with additional context (e.g. git diff -U10000)? Phab doesn't render it.

jessicah updated this revision to Diff 173209.Nov 8 2018, 12:15 PM

Updated diff with additional context upon review comments.

marco-c accepted this revision.Nov 14 2018, 10:29 AM

Thanks!

test/Driver/clang_f_opts.c
89

Could you add a test for --coverage too?

This revision is now accepted and ready to land.Nov 14 2018, 10:29 AM
jessicah updated this revision to Diff 174076.Nov 14 2018, 11:20 AM

Update test case for "--coverage" upon review comments.

marco-c accepted this revision.Nov 16 2018, 2:59 AM
vsk added a comment.Nov 26 2018, 11:17 AM

@jessicah Please ping this review if you need someone to commit this patch on your behalf.

I don't have commit permission to Clang review, can somebody commit this for me? Thanks, Jessica

This revision was automatically updated to reflect the committed changes.