This is a new attempt for bringing TSan libdispatch support to Linux.
The main issue with the last patch (https://reviews.llvm.org/D53171) was
that we want to avoid building a separate library.
The updated plan is as follows:
- Hide libdispatch support behind a flag: true on Darwin, false elsewhere. If flag is specified, assume that libdispatch header and -flbocks is available for building. This way we can directly include the libdispatch header and rely on blocks runtime for our implementation.
- Optionally/weakly intercept libdispatch API functions.
This patch accomplishes 1). It compiles (without the flag enabled) on
Linux. Follow-up patches will provide 2) and enabling of tests on Linux.