-
Notifications
You must be signed in to change notification settings - Fork 40
Description
BuildStream is a tool to execute full "package" builds, including awkward parts like configure scripts, stripping, integration commands, in a repeatable way using a sandbox. It can distribute these builds to build farm workers via the REAPI, at a granularity of one element => one worker. This means, that a large element like WebKit is only compiled on a single worker which can be slow.
Recc is a tool to distribute individual C/C++ compile tasks across build farm workers. At present, it cannot be used inside a BuildStream sandbox because it has no way to access the REAPI endpoint, but ... could we allow a controlled opening in the sandbox to enable Recc to be used inside element builds?
The ideal scenario would be a large element building as follows:
bst buildruns the elementconfigure-commandson a single worker, withreccreplacingccetc.bst buildruns the elementbuild-commands:
a. For each C/C++ compile operation,recchashes the inputs for the given compile operation to produce a cache key, and checks the remote cache via configured REAPI endpoint
b. If needed, compile is invoked on a remote worker. Then, the object file is downloaded from the cache.- Link operations run on the main worker and still probably take ages to complete.
- Profit!
This is not guaranteed to be faster than building on a single node, a lot depends on the infrastructure being used and the element being built. I think it would be worth exploring as part of a larger project to try and reduce build times of large BuildStream projects like gnome-build-meta.