<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>​Hi! <br>
</p>
<p><br>
</p>
<p>I want to build coverage report of a program compiled with <strong style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">clang-7.0</strong> in html.<br>
</p>
<p><br>
</p>
<p>My goal is to get summary report with information about coverage of source code files and links to them something like this <a href="https://llvm.org/reports/coverage/">https://llvm.org/reports/coverage/</a> </p>
<p><br>
I have found several ways to do so, correct me please if I'm wrong:</p>
<ol>
<li>​co<span style="font-size:12pt">​</span><span style="font-size:12pt">mpile '</span><span style="font-size:12pt"><strong>clang</strong></span><span style="font-size:12pt"> </span><span style="font-size:12pt"><strong>--covera</strong></span><span style="font-size:12pt"><strong>ge</strong>'
 and </span><span style="font-size:12pt">t</span><span style="font-size:12pt">h</span><span style="font-size:12pt">en, after
</span><span style="font-size:12pt">getting <strong>.gcno</strong> and <strong>.gcda</strong> files use
<strong>lcov</strong> or <strong>gcovr</strong> based on <strong>gcov</strong> of version </span><span style="font-size:12pt">4.2</span><span style="font-size:12pt">​<br>
BUT <br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">I </span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">can't
 make a report with </span><strong style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">gcov</strong><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"> of
 version 7.3.0 or 5.5.0. Is there any way to generate html from </span><strong style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">.gcov</strong><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"> files?</span>​<br>
<br>
</span></li><li><span style="font-size:12pt"></span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; background-color:rgb(255,255,255)">compile '<strong>clang -fsanitize-coverage=...</strong>', get <strong>.sancov</strong> files, make <strong>.symcov </strong>files and
 display them via </span><strong style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">coverage-report-server.py<br>
</strong>
<div>BUT <br>
I can't get <strong>.sancov</strong> files because <strong style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">
clang-7.0</strong> gives an error '.text.sancov.module_ctor' referenced in section '.init_array.[sancov.module_ctor.]' of obj.o:
<br>
defined in discarded section .text.sancov.module_ctor.[sancov.module_ctor]'. <br>
Actually I just need a set of html-files and html-index instead of a server.<br>
</div>
<div><br>
</div>
</li><li><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">compile</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"> '</span><strong style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">clang </strong><strong style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">-fcoverage-mapping -fprofile-instr-generate</strong><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">'</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">,
 get </span><strong style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">.profraw</strong><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"> file, </span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">mak</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">e</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"> </span><strong style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">.profdata</strong><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"> file,
 then use </span><strong style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">llvm-cov</strong><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"> to
 get</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"> </span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">html</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"> file
 for every </span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">file</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"> of </span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">src<br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">BUT <br>
It is possible to get html file for every source file, but it is impossible to get a summary report in html because of
<br>
error 'HTML output for summary reports is not yet supported.'</span></span></li></ol>
<div>
<div>​All of them look strange, so please, give me some advice or share your experience.<br>
</div>
</div>
</body>
</html>