[CMake] Support building on OS X without Xcode installation
authorChris Bieneman <beanz@apple.com>
Fri, 19 Aug 2016 22:22:35 +0000 (22:22 +0000)
committerChris Bieneman <beanz@apple.com>
Fri, 19 Aug 2016 22:22:35 +0000 (22:22 +0000)
commit9b818ac5d9a617dc2485ca3ed83b08f46d30824b
tree16d2ce1132d408fb287403dc77a45025e654e368
parent11da66fc103687beeb785eee224ede91669d9013
[CMake] Support building on OS X without Xcode installation

This should resolve PR23162. This patch has two parts.

First we need to check the error code from xcodebuild when querying for SDKs, second if the OS X SDK is not discovered, we ensure that /usr/include exists and use / as the OS X sysroot.

llvm-svn: 279336
compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
compiler-rt/cmake/config-ix.cmake