2.1.84. --[no_]multifile

This option enables or disables multifile compilation.

When --multifile is selected, the compiler performs optimizations across all files specified on the command line, instead of on each individual file. The specified files are compiled into one single object file.

The combined object file is named after the first source file you specify on the command line. To specify a different name for the combined object file, use the -o filename option.

An empty object file is created for each subsequent source file specified on the command line to meet the requirements of standard make systems.

Note

Compiling with --multifile has no effect if only a single source file is specified on the command line.

Default

The default is --no_multifile, unless the option -O3 is specified.

If the option -O3 is specified, then the default is --multifile.

Usage

When --multifile is selected, the compiler might be able to perform additional optimizations by compiling across several source files.

There is no limit to the number of source files that can be specified on the command line, but ten files is a practical limit, because --multifile requires large amounts of memory while compiling. For the best optimization results, choose small groups of functionally related source files.

Example

armcc -c --multifile test1.c ... testn.c -o test.o

The resulting object file is named test.o, instead of test1.c, and empty object files test2.o to testn.o are created for each source file test1.c ... testn.c specified on the command line.

See also

Copyright © 2007, 2010 ARM Limited. All rights reserved.ARM DUI 0348A
Non-Confidential