Reputation: 649
I'm a llvm new learner
after cmake -S llvm -B build -G Xcode -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi"
I got a llvm project, compiling the project is so slow
How to make it compile faster?
Ninja
is an option.
from the build folder, I see libLLVMWindowsManifest.a
i don't need windows platform version.
I just need X86 version
Upvotes: 2
Views: 2282
Reputation: 1095
-DLLVM_TARGETS_TO_BUILD="X86" is the flag you're looking for. But this alone won't speed up the build time significantly.
Play with CMAKE_BUILD_TYPE (-DCMAKE_BUILD_TYPE=Release/Debug/RelWithDebInfo/MinSizeRel) and see which suits you better. The default for CMAKE_BUILD_TYPE is Debug, and it's very slow.
If you want to debug builds, -DLLVM_OPTIMIZED_TABLEGEN=ON will improve your build time.
And finally, in my experience Ninja builds are slightly faster.
Upvotes: 9