You copied the Doc URL to your clipboard.

--multifile, --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.


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


The default is --no_multifile.


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.


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.