Thursday, June 21, 2007

Using Multiprocessor for building WinCE 6.0

Last week a cutomer and I tried to enable the Multiprocessor building option that is available for Windows CE 6.0. And located in "Tools -> Options" menu, in the "Platforn Builder for CE -> OS design and Build - 6.0 -> General" options.
When you enable that functionnality the build system will plainly use the power of your duo (maybe quad) processor. It will speed up the build by 30%, but there is a race condition issue when you are building layered drivers and the MDD/PDD are located in the same sub folder.

The build process will parallelize the build of the two folders, but in some condition the build of the MDD will finish before the end of the build of the PDD and will generate a build error as the PDD library is not available for the final link of the MDD.
To avoid that race condition for a layered driver you have to specify SYNCHRONIZE_BLOCK=1 into the PDD sources file to force the build to finish the current build before processing the next directory in the queue.

(Thanks to David for finding the workaround)
- Nicolas

No comments: