You copied the Doc URL to your clipboard.
--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
- The same directory as the armlink executable.
- The directories in the current directory search path.
LTO.dll
- The same directory as the armlink executable.
- The directories in the current directory search path.
On Linux:
llvm-lto
- The same directory as the armlink executable.
- The directories in the current directory search path.
libLTO.so
- The same directory as the armlink executable.
- The directories in the
D_LIBRARY_PATH
environment variable. - The cache file
/etc/ld.so.cache
. - The directories
/lib
and/usr/lib
.
Note
The armclang andllvm-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.