You copied the Doc URL to your clipboard.

--ltcg

This option instructs the compiler to create objects in an intermediate format so that Link-Time Code Generation (LTCG) optimizations can be performed. The optimizations applied include cross-module inlining to improve performance, and sharing of base addresses to reduce code size.

Note

  • This option might significantly increase link time and memory requirements. For large applications it is recommended that you do the code generation in partial link steps with a subset of the objects.

  • The LTCG feature is deprecated. As an alternative ARM recommends you use the --multifile option.

Example

The following example shows how to use the --ltcg option.

armcc -c --ltcg file1.c
armcc -c --ltcg file2.c
armlink --ltcg file1.o file2.o -o prog.axf

See also

Was this page helpful? Yes No