Reland "build: In LTO links, run just one link at once, but give it all cores"
This is a reland of 174d9faa For the reland, tolerate explicitly set number of concurrent links in thinlto builds as long as it's explicitly set to 1. This is needed for some cros bots. Original change's description: > build: In LTO links, run just one link at once, but give it all cores > > Normally, we allow running several links in parallel if there's enough > memory, since links tend to be memory- and io-bound, not compute bound. > However, in LTO builds the linker does codegen for every linked > translation unit, which needs a lot of CPU. > > Previously, we used to hardcode 8 threads per link for thinlto builds, > which makes builds needlessly slow on machines with many cores. > > Instead, automatically use all cores for a thinlto link, but only run > one link in parallel at once. > > chromeos-chrome-9999.ebuild in the Chrome OS build and link_jobs_32 in > mb_config.pyl currently manually set the number of threads per lto link > to the number of cores. Once this change here is in, we should stop > explicitly setting the arg there and then we can turn this from a gn arg > to a regular variable that's not settable in args.gn > > Bug: 1132930 > Change-Id: If2fda3e38b2b1827beb2da844f024f52211210db > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2464782 > Reviewed-by: Hans Wennborg <hans@chromium.org> > Commit-Queue: Nico Weber <thakis@chromium.org> > Auto-Submit: Nico Weber <thakis@chromium.org> > Cr-Commit-Position: refs/heads/master@{#816129} Bug: 1132930 Change-Id: I40840f971e2a87afe33e77f537776ba78cf027a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2464913Reviewed-by:Hans Wennborg <hans@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org> Cr-Commit-Position: refs/heads/master@{#816267}
Showing
Please register or sign in to comment