[CMake] [Darwin] Add support for generating Xcode-compatible toolchains that xcodebui...
authorChris Bieneman <beanz@apple.com>
Thu, 15 Oct 2015 20:09:01 +0000 (20:09 +0000)
committerChris Bieneman <beanz@apple.com>
Thu, 15 Oct 2015 20:09:01 +0000 (20:09 +0000)
commite0e13ae1e36c9fae3843b3d1aa1202632e899124
tree3ed76bb45c77c73ac9b1dde0ed1f1a0f62f5d3a0
parent62f0b1630b6592c6b5f3401eae038053ee2e0294
[CMake] [Darwin] Add support for generating Xcode-compatible toolchains that xcodebuild and xcrun can search

Summary:
Sometimes you want to install a custom compiler and use it like the system compiler without overriding the system compiler. This patch lets you create xctoolchains that the darwin command line tools can use.

To use this patch set LLVM_CREATE_XCODE_TOOLCHAIN=On in your CMake invocation and build the `install-code-toolchain` target.

After installation you can set the envar EXTERNAL_TOOLCHAINS_DIR to your installed Toolchains directory, and the TOOLCHAINS envar to the toolchain identifier (ex org.llvm.3.8.0svn). This will then cause /usr/bin/clang to call your newly installed clang.

Reviewers: Bigcheese, bogner

Subscribers: tobiasfar, llvm-commits

Differential Revision: http://reviews.llvm.org/D13605

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250450 91177308-0d34-0410-b5e6-96231b3b80d8
tools/xcode-toolchain/CMakeLists.txt [new file with mode: 0644]