Older versions of cmake don't support the -E env option which was added in r250335, causing the build to fail with:
[...] [2632/2743] Linking CXX executable bin/debugserver FAILED: : && /usr/bin/c++ -std=c++11 -stdlib=libc++ [...] -o bin/debugserver lib/liblldbDebugserverCommon.a lib/liblldbUtility.a lib/liblldbDebugserverMacOSX_I386.a lib/liblldbDebugserverMacOSX_X86_64.a -framework Cocoa -Wl,-rpath,@executable_path/../lib && cd /Users/testuser/build/workspace/LLVM-Clang-LLDB_master_release_OSX/llvm/build_ninja/bin && /usr/local/Cellar/cmake/3.0.2/bin/cmake -E env CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate codesign --force --sign lldb_codesign debugserver CMake Error: cmake version 3.0.2 Usage: /usr/local/Cellar/cmake/3.0.2/bin/cmake -E [command] [arguments ...] Available commands: chdir dir cmd [args]... - run command in a given directory [...]
This patch fixes this by invoking codesigning as it was before the commit if the cmake version is less than than 3.2.