[PATCH] D14546: [tsan] Add TSan unit test support for OS X
Kuba Brecka via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 10 10:37:33 PST 2015
kubabrecka created this revision.
kubabrecka added reviewers: dvyukov, kcc, samsonov, glider.
kubabrecka added subscribers: llvm-commits, zaks.anna, ismailp.
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.
http://reviews.llvm.org/D14546
Files:
cmake/Modules/CompilerRTCompile.cmake
cmake/config-ix.cmake
lib/tsan/CMakeLists.txt
lib/tsan/tests/CMakeLists.txt
lib/tsan/tests/rtl/CMakeLists.txt
lib/tsan/tests/rtl/tsan_test.cc
lib/tsan/tests/rtl/tsan_test_util_linux.cc
lib/tsan/tests/unit/tsan_clock_test.cc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14546.39828.patch
Type: text/x-patch
Size: 11330 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151110/57d0c1ac/attachment.bin>
More information about the llvm-commits
mailing list