Submission Interface - Accelerating Microsoft NMAKE and Other
Build Tools
Overview
While the Automatic
Interception Interface can be used to accelerate a wide variety of build
tools which support local parallel task execution, some build
tools like Microsoft NMAKE do not currently support parallel
execution of processes. IncrediBuild can accelerate code builds run
by NMAKE and other build tools using the Submission interface and a few
utility batch files.
Accelerating NMAKE Builds
The IncrediBuild installation includes pre-built scripts and sample
code for accelerating Visual Studio C and C++ compilation in builds
run by NMAKE. The same concept can be applied for other build tools
and other tools. To distribute NMAKE C/C++ builds with
IncrediBuild, follow the following steps:
1. copy cl.bat and link.bat from the "XGE\NMAKE Support" folder
(under the IncrediBuild installation folder) to either the project
folder or another folder which is specified in the system path
*before* the Visual Studio C++ Bin folder.
2. Run NMAKE using xgConsole (e.g. xgConsole /command=NMAKE).
For a working sample, see the "XGE/Samples/Submission
Interface/NMAKE" folder under the IncrediBuild installation
folder.
Distributed NMAKE builds work using the following concept:
cl.bat substitutes calls made by NMAKE to cl.exe, and, instead of
executing the compiler, writes the compiler command line to a
response file (CLCommands.rsp in this example).
link.bat substitutes calls made by NMAKE to link.exe. It runs
xgSubmit.exe with the response file (CLCommands.rsp) as input,
distributing all compilation tasks to the XGE queue. Finally, it
waits for all the compiler calls (using xgWait.exe) and then
executes the link step.
Notes:
- This concept can be applied for additional tools called by NMAKE
that you might wish to execute remotely (create a similar .bat file
for each tool, modifying the batch files as appropriate).
- Link steps might be a bottleneck in NMAKE builds since no
compilation will take place while a link step is running. However,
by tailoring the batch files according to your build's dependencies
(using multiple groups in your calls to xgSubmit and running the
linker through xgSubmit with the /DEPENDSON command line option)
the build's performance can be optimized.
Copyright (C) 2001-2011 Xoreax Software Ltd. All rights
reserved.