<div dir="ltr">Hi,<div><br></div><div style>Using recent SVN;</div><div style><br></div><div style><div>[/havana/t]> clang -v</div><div>SUSE Linux clang version 3.3 (trunk 180017) (based on LLVM 3.3svn)</div><div>Target: x86_64-unknown-linux-gnu</div>

<div>Thread model: posix</div><div><br></div><div>[/havana/t]> cat t.cpp <br></div><div>#include <iostream></div><div><br></div><div>int main()</div><div>{</div><div>    std::cout << "Foo, bar!" << std::endl;</div>

<div>    return 0;</div><div>}</div><div><br></div><div style>This works fine with clang 3.2:</div><div style><br></div><div>[/havana/t]> clang++ -coverage t.cpp<br></div><div>/tmp/t-QAe5WH.o: In function `__llvm_gcov_writeout':</div>

<div>t.cpp:(.text+0x75): undefined reference to `llvm_gcda_start_file'</div><div>t.cpp:(.text+0x8b): undefined reference to `llvm_gcda_emit_function'</div><div>t.cpp:(.text+0x9d): undefined reference to `llvm_gcda_emit_arcs'</div>

<div>t.cpp:(.text+0xb4): undefined reference to `llvm_gcda_emit_function'</div><div>t.cpp:(.text+0xc6): undefined reference to `llvm_gcda_emit_arcs'</div><div>t.cpp:(.text+0xdd): undefined reference to `llvm_gcda_emit_function'</div>

<div>t.cpp:(.text+0xef): undefined reference to `llvm_gcda_emit_arcs'</div><div>t.cpp:(.text+0xf4): undefined reference to `llvm_gcda_end_file'</div><div>/tmp/t-QAe5WH.o: In function `__llvm_gcov_init':</div>
<div>
t.cpp:(.text+0x145): undefined reference to `llvm_gcov_init'</div><div>clang: error: linker command failed with exit code 1 (use -v to see invocation)</div><div><br></div><div style>Manually giving path to libclang_rt.profile-%{arch}.a</div>

<div style><br></div><div>[/havana/t]> clang++ -coverage t.cpp /usr/lib64/clang/3.3/lib/linux/libclang_rt.profile-x86_64.a <br></div><div>[/havana/t]><br></div><div><br></div><div style>works. So the question is should the driver automatically link to the correct library when -coverage option is present?</div>

<div style><br></div><div style>Thanks.</div><div style><br></div></div></div>