You copied the Doc URL to your clipboard.

ARM Compiler armlink User Guide : --lto, --no_lto [ALPHA]

--lto, --no_lto [ALPHA]

Enables link time optimization of LLVM bitcode files.

Caution

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

Note

  • Although this option is fully supported in armlink, it is an [ALPHA] feature in ARM® Compiler 6.
  • ARM Compiler does not support link time optimization on 32-bit Red Hat Enterprise Linux platforms.
  • Linux platforms are not supported when using ARM Compiler with the μVision® IDE in the Keil MDK-ARM Microprocessor Development Kit.
  • Bitcode files are produced by armclang with the -flto option.

With the --no_lto option, armlink gives an error message if it encounters any bitcode files.

Default

The default is --no_lto.

Dependencies

Link time optimization requires the executable llvm-lto and the dependent library libLTO.

Table 11-4 Link time optimization dependencies

Dependency Windows filename Linux filename
llvm-lto llvm-lto.exe llvm-lto
libLTO LTO.dll libLTO.so

By default, the llvm-lto executable and dependent library libLTO are present in the same directory as armlink.

The search order for these dependencies is as follows.

On Windows:

  • llvm-lto.exe
    1. The same directory as the armlink executable.
    2. The directories in the current directory search path.
  • LTO.dll
    1. The same directory as the armlink executable.
    2. The directories in the current directory search path.

On Linux:

  • llvm-lto
    1. The same directory as the armlink executable.
    2. The directories in the current directory search path.
  • libLTO.so
    1. The same directory as the armlink executable.
    2. The directories in the D_LIBRARY_PATH environment variable.
    3. The cache file /etc/ld.so.cache.
    4. The directories /lib and /usr/lib.

Note

The armclang and llvm-lto executables and the libLTO library must come from the same ARM Compiler 6 installation. Any use of llvm-lto or libLTO other than those supplied with ARM Compiler 6 is unsupported.
Was this page helpful? Yes No