This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Enable building and testing of libcxx with ThreadSanitizer on OS X
ClosedPublic

Authored by kubamracek on Sep 7 2016, 8:03 AM.

Details

Summary

This patch enables building and testing libcxx under ThreadSanitizer on OS X. CMake builds that have -DLLVM_USE_SANITIZER=Thread will automatically build libcxx with -fsanitize=thread and testing via lit then runs under TSan. There was one more typo in a python config script, but after that is fixed I verified that the TSan build works.

This diff also adds a regression test for the bug (data race) fixed in https://reviews.llvm.org/D24028. If you revert the fix, TSan will report a data race in call_once. If approved, I’ll commit the test separately.

Diff Detail

Repository
rL LLVM

Event Timeline

kubamracek updated this revision to Diff 70536.Sep 7 2016, 8:03 AM
kubamracek retitled this revision from to [libcxx] Enable building and testing of libcxx with ThreadSanitizer on OS X.
kubamracek updated this object.
kubamracek added reviewers: EricWF, dexonsmith, compnerd.
kubamracek added a project: Restricted Project.
kubamracek added a subscriber: zaks.anna.
This revision was automatically updated to reflect the committed changes.