2.17.3 Minimizing compilation build time with a single armcc invocation

Using a single armcc invocation rather than multiple invocations helps minimize compilation build time.

The following type of script incurs multiple loads and unloads of the compiler and multiple license checkouts:
armcc file1.c ...
armcc file2.c ...
armcc file3.c ...
Instead, you can try modifying your script to compile multiple files within a single invocation of armcc. For example, armcc file1.c file2.c file3.c ...
For convenience, you can also list all your .c files in a single via file invoked with armcc -via sources.txt.
Although this mechanism can dramatically reduce license checkouts and loading and unloading of the compiler to give significant improvements in build time, the following limitations apply:
  • All files are compiled with the same options.
  • Converting existing build systems could be difficult.
  • Usability depends on source file structure and dependencies.
  • An IDE might be unable to report which file had compilation errors.
  • After detecting an error, the compiler does not compile subsequent files.
Related concepts
2.17.1 Compilation build time
Related tasks
2.17.2 Minimizing compilation build time
Related reference
7.115 --multifile, --no_multifile
7.120 -Onum
7.170 --via=filename
Related information
Licensed features of ARM Compiler
Non-ConfidentialPDF file icon PDF versionARM DUI0375F
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.