You copied the Doc URL to your clipboard.

ARM Compiler armclang Reference Guide : -flto [ALPHA]

-flto [ALPHA]

Enables link time optimization, outputting bitcode files for link time optimization rather than ELF object files.

Note

This topic describes an [ALPHA] feature. See Support level definitions.

The primary use for bitcode files is for link time optimization. See Optimizing across modules with link time optimization in the Software Development Guide for more information about link time optimization.

Usage

The compiler creates one bitcode file for each source file, with a .o file extension replacing the file extension on the input source file.

The -flto option passes the --lto option to armlink to enable link time optimization, unless the -c option is specified.

Caution

Link Time Optimization performs aggressive optimizations. Sometimes this can result in large chunks of code being removed.

Related reference