Page 1 of 1

Build process starts out with just 1 unit

Posted: Wed Jun 30, 2021 9:58 am
by zzattack
Regardless of the number of CPU cores set to use by TwineCompile, it appears on my systems that initially only a single unit is compiled simultaneously. Once compilation of this first unit completes, the actual requested number of cores is put to use.
Is this deliberate, optional and/or desirable?

Re: Build process starts out with just 1 unit

Posted: Wed Jun 30, 2021 4:26 pm
by jomitech
This is deliberate for any project that has been configured to use pre-compiled headers. The first unit is compiled by itself to generate the pre-compiled header and then subsequent units can use this pre-compiled header. If multiple files were initially compiled simultaneously, they would either be unable to use that pre-compiled header, or would cause it to be corrupted because it was generated by several units.

If your project does not use pre-compiled headers, you can turn them off in the compiler options, and TwineCompile will compile as many files as possible from the start.

Re: Build process starts out with just 1 unit

Posted: Wed Jun 30, 2021 4:56 pm
by zzattack
That makes perfect sense, thanks for clearing it up!

Re: Build process starts out with just 1 unit

Posted: Thu Aug 26, 2021 3:03 am
by zzattack
Even after setting the following project options, I'm still seeing the same behavior:

Code: Select all

 - PCH Usage (Do not use)
 - External types files (false)
 - Enable smart cached precompiled headers (false)
 - Cache precompiled headers (false)
This is the same for all projects in my group project. Anything else I could be missing? (Maybe some #pragma smart header stuff?)

Re: Build process starts out with just 1 unit

Posted: Thu Aug 26, 2021 9:00 am
by jomitech
Are you using the Classic or CLANG compiler?

Re: Build process starts out with just 1 unit

Posted: Fri Aug 27, 2021 8:22 am
by zzattack
We're using the CLang compiler.

Re: Build process starts out with just 1 unit

Posted: Sat Aug 28, 2021 8:24 am
by jomitech
I've made an update that will allow TwineCompile to determine if CLANG is being used without precompiled headers (unlike the classic compiler, there are no explicit flags for it).

Please download the following file and extract into the TwineCompile Program Files directory:
http://jomitech.com/downloads/mtbcc32.zip

Re: Build process starts out with just 1 unit

Posted: Tue Aug 31, 2021 3:57 am
by zzattack
Hi Jon,
Thanks for that. I've done a bunch of builds with it, and I believe this works as expected. Each project now starts with multiple compiler invocations right away. I hope this will make it into an official update :)

Re: Build process starts out with just 1 unit

Posted: Tue Aug 31, 2021 10:22 am
by jomitech
Yes, it'll be part of the next release. Glad it worked for you.