[llvm] r276718 - [CMake] Updating Xcode Toolchain creation to support Xcode 7
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 25 17:47:52 PDT 2016
Author: cbieneman
Date: Mon Jul 25 19:47:52 2016
New Revision: 276718
URL: http://llvm.org/viewvc/llvm-project?rev=276718&view=rev
Log:
[CMake] Updating Xcode Toolchain creation to support Xcode 7
Recent changes to Xcode have changed the structure of Xcode toolchains. This patch makes the xcode-toolchain goop construct a new-format Xcode toolchain that is compatible with Xcode 7.
The new format has a compatibility version key, so when a new format comes out we can support multiple formats in parallel.
Modified:
llvm/trunk/tools/xcode-toolchain/CMakeLists.txt
Modified: llvm/trunk/tools/xcode-toolchain/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/xcode-toolchain/CMakeLists.txt?rev=276718&r1=276717&r2=276718&view=diff
==============================================================================
--- llvm/trunk/tools/xcode-toolchain/CMakeLists.txt (original)
+++ llvm/trunk/tools/xcode-toolchain/CMakeLists.txt Mon Jul 25 19:47:52 2016
@@ -52,19 +52,20 @@ if(NOT toolchains_match)
endif()
set(toolchains_dir ${CMAKE_MATCH_1})
-set(XcodeDefaultInfo "${toolchains_dir}/XcodeDefault.xctoolchain/ToolchainInfo.plist")
set(LLVMToolchainDir "${CMAKE_INSTALL_PREFIX}/Toolchains/LLVM${PACKAGE_VERSION}.xctoolchain/")
add_custom_command(OUTPUT ${LLVMToolchainDir}
COMMAND ${CMAKE_COMMAND} -E make_directory ${LLVMToolchainDir})
-add_custom_command(OUTPUT ${LLVMToolchainDir}/ToolchainInfo.plist
+add_custom_command(OUTPUT ${LLVMToolchainDir}/Info.plist
DEPENDS ${LLVMToolchainDir}
- COMMAND ${CMAKE_COMMAND} -E copy "${XcodeDefaultInfo}" "${LLVMToolchainDir}/ToolchainInfo.plist"
- COMMAND /usr/libexec/PlistBuddy -c "Set:Identifier org.llvm.${PACKAGE_VERSION}" "${LLVMToolchainDir}/ToolchainInfo.plist")
+ COMMAND ${CMAKE_COMMAND} -E remove ${LLVMToolchainDir}/Info.plist
+ COMMAND /usr/libexec/PlistBuddy -c "Add:CFBundleIdentifier string org.llvm.${PACKAGE_VERSION}" "${LLVMToolchainDir}/Info.plist"
+ COMMAND /usr/libexec/PlistBuddy -c "Add:CompatibilityVersion integer 1" "${LLVMToolchainDir}/Info.plist"
+ )
add_custom_target(install-xcode-toolchain
- DEPENDS ${LLVMToolchainDir}/ToolchainInfo.plist
+ DEPENDS ${LLVMToolchainDir}/Info.plist
COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target all
COMMAND "${CMAKE_COMMAND}"
-DCMAKE_INSTALL_PREFIX=${LLVMToolchainDir}/usr/
@@ -77,7 +78,7 @@ if(LLVM_DISTRIBUTION_COMPONENTS)
endif()
add_custom_target(install-distribution-toolchain
- DEPENDS ${LLVMToolchainDir}/ToolchainInfo.plist distribution)
+ DEPENDS ${LLVMToolchainDir}/Info.plist distribution)
foreach(target ${LLVM_DISTRIBUTION_COMPONENTS})
add_custom_target(install-distribution-${target}
More information about the llvm-commits
mailing list