<div dir="ltr">I've landed this change as r205308, with a few fixes/enhancements. However, if I configure/build the tree with -DCOMPILER_RT_BUILD_SHARED_ASAN=ON and run "make check-asan",<div>some of the tests fail with the following linker errors:</div>
<div>llvm/projects/compiler-rt/test/asan/TestCases/stack-overflow.cc:105: error: undefined reference to 'pthread_join'<br></div><div><br></div><div>I presume, this happens because we don't explicitly provide -lpthread in the clang invocation in RUN: line. "-lpthread" is added automatically if we link with static ASan runtime, but in your patch</div>
<div>to the Clang driver you explicitly changed this behavior for -shared-libasan. I had to add "-lpthread" to CMake rules for building instrumented ASan unit test as well. What am I doing wrong?</div><div>Why linking with dynamic ASan runtime doesn't pulls in libpthread?</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 1, 2014 at 3:45 PM, Yury Gribov <span dir="ltr"><<a href="mailto:tetra2005@gmail.com" target="_blank">tetra2005@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
  Cool! BTW when will the next merge to GCC happen?<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D3042" target="_blank">http://llvm-reviews.chandlerc.com/D3042</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div>
</div>