Hi, this patch adds a CMake flag called COMPILER_RT_ENABLE_TSAN_OSX, which is off by default. If enabled, the build system will be building the OS X version of the TSan runtime library (called libclang_rt.tsan_osx_dynamic.dylib). I'll submit patches that fix OS X build errors shortly.
This is part of an effort to port TSan to OS X, and it's one the very first steps. Don't expect TSan on OS X to actually work or pass tests at this point.