Xcode generator over twice as slow as the Ninja generator when configuring llvm
Summary:
When running cmake on the same llvm source tree, with the same configuration, I've noticed that the Xcode generator takes 10 minutes to complete, while the Ninja generator only takes 4 minutes. While the Xcode generator was running, I ran "top" and noticed that cmake spends a fair amount of time running xcodebuild, which could slow down configuration.
Steps to reproduce:
- Set up a full, 6-repo llvm checkout in ~/src/llvm.org-master-for-xcode
Instructions for doing this: http://llvm.org/docs/GettingStarted.html#git-mirror
- Configure with Ninja:
xcrun cmake -G Ninja \
-DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64" \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DLLVM_ENABLE_ASSERTIONS:BOOL=On \
-DBUILD_SHARED_LIBS=On \
-DLLVM_ENABLE_MODULES=On \
-DLLVM_INCLUDE_TESTS:BOOL=On \
~/src/llvm.org-master-for-xcode/llvm
This takes 4 minutes on my machine.
- Configure the same source tree, with the same options, for Xcode:
xcrun cmake -G Xcode \
-DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64" \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DLLVM_ENABLE_ASSERTIONS:BOOL=On \
-DBUILD_SHARED_LIBS=On \
-DLLVM_ENABLE_MODULES=On \
-DLLVM_INCLUDE_TESTS:BOOL=On \
~/src/llvm.org-master-for-xcode/llvm
This takes 10 minutes.
Configuration:
Cmake 3.7.2 Fusion Drive (200GB SSD + 1TB HDD)