This patch enables building and running TSan unit tests on OS X. There are several changes:
- Move the detection of OSX_SYSROOT_FLAG to config-ix.cmake so it becomes a global-scope variable.
- Add building a static version of the runtime and link it with the unit tests.
- Modify tsan_test_util_linux.cc to be Darwin-compatible and add it into the OS X build. In a subsequent commit, I'll rename the file to tsan_test_util_posix.cc.
- Use symbolize=false:abort_on_error=0 as default TSAN_OPTIONS to speed up the unit tests significantly.
- In tsan_clock_test.cc, replace CLOCK_MONOTONIC with gettimeofday, which is available on OS X.