[PATCH] D53171: [tsan] Bring Dispatch support to Linux

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 22 14:08:06 PDT 2018


kubamracek added a comment.

In https://reviews.llvm.org/D53171#1263122, @dvyukov wrote:

> Is it possible to make it just part of tsan without introducing a separate static library? That would be more scalable and easier to use.
>
> We already doing something similar in tsan_interceptors.cc. For example, we intercept some libc++ functions, but end user may not link in libc++ and it will all work because interceptors do dynamic dispatch and don't fail if a function is not resolved.
>  This would require calling all dispatch functions as REAL(dispatch_foo), but otherwise should work.


The real problem here is -fblocks, which needs -lBlocksRuntime, and this dependency is implicitly generated by the compiler and I don't think there's a way to make it a weak dependency. I also don't want to rewrite this file to not use blocks as that's going to make everything much less readable. I'm open to suggestions, of course.

Don't we already have a separate clang_rt.tsan_cxx static library? I thought that's here specifically to break up the dependencies.


https://reviews.llvm.org/D53171





More information about the llvm-commits mailing list