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

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 11 14:46:03 PDT 2018


kubamracek created this revision.
kubamracek added reviewers: dvyukov, kcc, eugenis, george.karpenkov, delcypher.
kubamracek added a project: Sanitizers.
Herald added subscribers: jfb, mgorny.

Right now, TSan supports libdispatch only on Darwin, but the library is available on Linux as well (as part of the Swift project). Let's make TSan intercept the libdispatch APIs and support it on Linux.

The patch introduces a new build output on Linux, clang_rt.tsan_libdispatch-x86_64.a (for x86), which is an optional static library. The normal build of TSan is not changed, but if you use libdispatch for a project, you should link this optional library in. The patch also removes the build-time dependency on dispatch.h and manually declared the APIs that are used.


https://reviews.llvm.org/D53171

Files:
  lib/tsan/CMakeLists.txt
  lib/tsan/rtl/tsan_libdispatch.cc
  lib/tsan/rtl/tsan_libdispatch_mac.cc
  lib/tsan/rtl/tsan_rtl.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53171.169308.patch
Type: text/x-patch
Size: 45134 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181011/4fcb2ccb/attachment.bin>


More information about the llvm-commits mailing list