CPU usage during compilation
-
@ustk I think Xcode already does multi-threaded linking.
-
@ustk mac je met 1h pour un vst. Windows 4 minutes. Ça rend ouf
-
@yall pareil. 1/2 an hour on my mac (Intel i7) , 5mins on pc
-
How many threads are you guys using for your builds?
-
I am using all threads -2
I am building using the batchCompile
make CONFIG=Release AR=gcc-ar -j`nproc --ignore=2`
-
@d-healey said in CPU usage during compilation:
How many threads are you guys using for your builds?
Yes. :)
-
@oskarsh I was asking the Mac guys who are saying their builds are slow. :)
-
@d-healey Just 1 thread here. Do you know if there's a way to change that ?
-
@Matt_SF That explains it. There is definitely a way but I can't remember how. Google will help you here :)
-
@d-healey I think the problem is that on macOS the linker (
ld
) is only single threaded (at least here) and you can't replace it with another linker easily. -
-flto=auto
Setting the link time optimization to auto is not the solution as it might just deactivate it (depending what
auto
means) and sure then you decrease the build time but you end up with a bigger and less optimized binary. The link time optimization (lto) is the step that takes the most time which is why I deactivated it on the CI test build of the demo project so that the macOS test suite runs as fast as the Windows one. -
Setting the link time optimization to auto is not the solution
Works here on Debian. If that option is available on Mac you can replace
auto
with the number of threads you'd like to use.