When using ThinLTO, the linker performs its own parallelism. This
change limits the number of parallel link jobs that Ninja will issue
to keep the total number of threads reasonable when linking with
ThinLTO.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Alternatively, we could limit the parallelism of the link jobs, but limiting the number of link jobs is better, because it avoids having to wait a very long time for the last link job. For the same reason, the number of concurrent link jobs is 2 rather than 1.
cmake/modules/HandleLLVMOptions.cmake | ||
---|---|---|
20 ↗ | (On Diff #95018) | This code is unchanged, but has been moved up to make uppercase_LLVM_ENABLE_LTO available when setting the number of link jobs. |
Comment Actions
This will emit a warning when ThinLTO is enabled and the build system is not Ninja. I'll cook up a version that inhibits that warning.
Comment Actions
- No warning when not using Ninja.
- Simplified the change.
- Fixed buggy behavior on Linux.