You copied the Doc URL to your clipboard.

--lto, --no_lto

Enables link time optimization of LLVM bitcode files.

Note

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 shared library libLTO.

Table 4. Link time optimization dependencies
DependencyWindows filenameLinux filename
llvm-ltollvm-lto.exellvm-lto
libLTOlibLTO.dlllibLTO.so

By default, the llvm-lto executable and libLTO shared library 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.

  • libLTO.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 LD_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.