Page MenuHomePhabricator

Use ninja pool to limit the number of concurrent compile/link jobs
ClosedPublic

Authored by eugenis on Nov 18 2014, 3:55 AM.

Details

Reviewers
chandlerc
Summary

This change makes use of the new "job pool" capability in cmake 3.0 with ninja generator to allow limiting the number of concurrent jobs of a certain type.

For some reason, there is no way to define "JOB_POOLS" global property on the command line (or is there?).

We need this to limit the number of link jobs on the sanitizer-bootstrap bot, which runs out of memory linking multiple targets with debug info and sanitizer instrumentation.

Diff Detail

Event Timeline

eugenis updated this revision to Diff 16322.Nov 18 2014, 3:55 AM
eugenis retitled this revision from to Use ninja pool to limit the number of concurrent compile/link jobs.
eugenis updated this object.
eugenis edited the test plan for this revision. (Show Details)
eugenis added a reviewer: chandlerc.
eugenis set the repository for this revision to rL LLVM.
eugenis added subscribers: Unknown Object (MLST), brad.king.
eugenis updated this revision to Diff 16327.Nov 18 2014, 6:13 AM
eugenis updated this object.

Removed the check for cmake version and generator type.

-j sets the general limit on concurrent build jobs, and these two are
separate limits on compile/link jobs.

eugenis updated this revision to Diff 16336.Nov 18 2014, 8:32 AM

Added a mention of the new variables to the docs.
Made the new variables cacheable.

chandlerc edited edge metadata.Nov 18 2014, 12:52 PM

This looks good as a an initial patch. If there are further refinements we want here, they can be post-commit IMO. Thanks!

chandlerc accepted this revision.Nov 18 2014, 1:00 PM
chandlerc edited edge metadata.
This revision is now accepted and ready to land.Nov 18 2014, 1:00 PM
eugenis closed this revision.Nov 19 2014, 2:30 AM

Thanks, committed as r222341.