diff options
author | Kuba Brecka <kuba.brecka@gmail.com> | 2015-11-11 14:53:57 +0000 |
---|---|---|
committer | Kuba Brecka <kuba.brecka@gmail.com> | 2015-11-11 14:53:57 +0000 |
commit | 2ab569e9198fba1a55bd0b7d084a7567352a05a5 (patch) | |
tree | 9768ea34cb2e1fea464cf9574d5e7eae5b2052ed /cmake/config-ix.cmake | |
parent | a95fccfa2f802d78e4449a082b9c5d03d7988176 (diff) |
[tsan] Add TSan unit test support for OS X
This patch enables building and running TSan unit tests on OS X.
Differential Revision: http://reviews.llvm.org/D14546
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252731 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/config-ix.cmake')
-rw-r--r-- | cmake/config-ix.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index f137d51c7..60ea3d91b 100644 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -279,6 +279,17 @@ set(ALL_SAFESTACK_SUPPORTED_ARCH ${X86} ${X86_64}) if(APPLE) include(CompilerRTDarwinUtils) + # On Darwin if /usr/include doesn't exist, the user probably has Xcode but not + # the command line tools. If this is the case, we need to find the OS X + # sysroot to pass to clang. + if(NOT EXISTS /usr/include) + execute_process(COMMAND xcodebuild -version -sdk macosx Path + OUTPUT_VARIABLE OSX_SYSROOT + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + set(OSX_SYSROOT_FLAG "-isysroot${OSX_SYSROOT}") + endif() + option(COMPILER_RT_ENABLE_IOS "Enable building for iOS - Experimental" Off) find_darwin_sdk_dir(DARWIN_osx_SYSROOT macosx) |