[TSan][libdispatch] Remove dependency on system headers
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. Reviewed By: kubamracek Differential Revision: https://reviews.llvm.org/D59145 llvm-svn: 356201
Loading
Please sign in to comment