Multiprocessing build

Cherrypick of the build portion of #540.