[PATCH] Optional support for dynamic Asan runtime

Yuri Gribov tetra2005 at gmail.com
Tue Apr 1 07:35:54 PDT 2014


> 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.

Right, I link shared libasan against pthread if it's available so it
should not be necessary to link it in driver. Here's the excerpt from
lib/asan/CMakeFiles.txt:

set(ASAN_DYNAMIC_LIBS stdc++ m c)
append_if(COMPILER_RT_HAS_LIBPTHREAD pthread ASAN_DYNAMIC_LIBS)

Perhaps COMPILER_RT_HAS_LIBPTHREAD is OFF on your platform?

-Y



More information about the llvm-commits mailing list