Swift: enable parallel builds
The swift build model uses a single shot compile/link phase. The driver itself controls the parallel compilation by means of the -num-threads
parameter which takes the number of parallel threads to execute. This can also be spelt -j
if desired. However, this needs to be passed to the driver to enable the parallel compilation. Passing NUM_CPUS
is not really reasonable since that can over-subscribe the system due to ninja trying to run parallel builds of independent libraries with each one trying to run threads that saturate the cores. Without the parallel builds, the build times are terrible due to the single core usage and the system is vastly under-utilized particularly at high core counts.