Reducing build times of ldc-build-runtime

kinke noone at nowhere.com
Tue Mar 17 21:33:53 UTC 2020


On Tuesday, 17 March 2020 at 20:09:54 UTC, Jacob Carlborg wrote:
> Is there a way to reduce the build times? It looks like it 
> compiles all files separately.

The regular libs are built all-at-once (by default), but the 
unittests require separate compilation (otherwise you need 
something like 24 GB of RAM). With ninja, you're using 
parallelization by default, but I'd still recommend to set the 
number of parallel jobs explicitly in the ldc-build-runtime 
cmdline. Each job should have about 2 GB of memory. What are the 
hardware specs for bitrise?

> Can we avoid building some version(s)? Perhaps skip unittest 
> and only build unittest-debug?

Sure, if the release unittests take too long to compile, then go 
ahead and exclude them for now. A simple variant is to invoke 
ldc-build-runtime as usual, but without `--testrunners`, and 
instead invoke `ninja -j<N> druntime-test-runner-debug 
phobos2-test-runner-debug` manually in the ldc-build-runtime.tmp 
directory.

> Since this is done using cross-compiling it might be possible 
> to build the binaries on a different CI service and then 
> trigger a build on Bitrise using their API to run the actual 
> tests. But that would make it more complicated.

Yeah, 45 minutes is pretty short (and 11 minutes to compile LDC 
very slow). An x86 simulator for Azure CI or so would be pretty 
much unrestricted (6h time-out...).


More information about the digitalmars-d-ldc mailing list