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

Authored by jessicah on Tue, Nov 6, 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
jessicah created this revision.Tue, Nov 6, 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.Thu, Nov 8, 12:15 PM

Updated diff with additional context upon review comments.

marco-c accepted this revision.Wed, Nov 14, 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.Wed, Nov 14, 10:29 AM
jessicah updated this revision to Diff 174076.Wed, Nov 14, 11:20 AM

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

marco-c accepted this revision.Fri, Nov 16, 2:59 AM