[PATCH] D59145: [TSan][libdispatch] Remove dependency on system headers
Julian Lettner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 8 11:51:35 PST 2019
yln created this revision.
Herald added subscribers: llvm-commits, Sanitizers, jdoerfert, kubamracek.
Herald added projects: Sanitizers, LLVM.
Including <dispatch/dispatch.h> and <Blocks.h> transitively pulls in
other system headers. Let's try to avoid that.
Blocks.h: compiler-rt already includes a blocks runtime. Just use the
header file that comes with it.
dispatch.h: Declare the bare minimum required for our implementation,
i.e., everything needed to define the interceptors, but not the
interceptors themselves. See tsan_dispatch_defs.h. I spotted a few other
places in compile-rt, where we declare libdispatch types. Maybe this
file can be moved to sanitizer_common if we deem it useful enough.
tsan_libdispatch.cc now compiles on Linux/Clang (requires support for
-fblocks). Linking still requires some manual configuration.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D59145
Files:
compiler-rt/lib/tsan/rtl/tsan_dispatch_defs.h
compiler-rt/lib/tsan/rtl/tsan_libdispatch.cc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59145.189896.patch
Type: text/x-patch
Size: 4581 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190308/0bb7c6dc/attachment.bin>
More information about the llvm-commits
mailing list