-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This builds LLVM with profile-guided optimisations. I've adapted the build from upstream documentation. [1, 2] This does mean that builds will now take 2-3x longer than before. LLVM currently takes about four hours to build at most (including recursive dependents), so the additional time isn't as bad as some other formulae that require long CI runs. Moreover, the collective time this saves users of the LLVM formula should make the additional build time worth it. LTO is another potential optimisation that I haven't enabled here. This appears to be enabled in Apple's default build [3], but is a little complicated to implement for an LLVM distribution that includes static archives [4]. Closes #77975 [1] https://llvm.org/docs/HowToBuildWithPGO.html#building-clang-with-pgo [2] https://github.com/llvm/llvm-project/blob/33ba8bd2/llvm/utils/collect_and_build_with_pgo.py [3] https://github.com/apple/llvm-project/blob/swift-5.4-RELEASE/clang/cmake/caches/Apple-stage2.cmake#L30 [4] https://llvm.org/docs/BuildingADistribution.html#options-for-optimizing-llvm
- Loading branch information
Showing
1 changed file
with
133 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters