[PATCH] Optional support for dynamic Asan runtime

Alexey Samsonov samsonov at google.com
Tue Apr 1 06:45:53 PDT 2014


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",
some of the tests fail with the following linker errors:
llvm/projects/compiler-rt/test/asan/TestCases/stack-overflow.cc:105: error:
undefined reference to 'pthread_join'

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
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?
Why linking with dynamic ASan runtime doesn't pulls in libpthread?


On Tue, Apr 1, 2014 at 3:45 PM, Yury Gribov <tetra2005 at gmail.com> wrote:

>
>   Cool! BTW when will the next merge to GCC happen?
>
> http://llvm-reviews.chandlerc.com/D3042
>



-- 
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140401/1e6ef0f2/attachment.html>


More information about the llvm-commits mailing list