OS Manuals

/usr/bin/llvm-lto

Low-level virtual machine 17 - core frameworks

From llvm-17 17.0.6-r30 (os), captured 2026-11-05 by running llvm-lto --help (exit 0). permalink

OVERVIEW: llvm LTO linker

USAGE: llvm-lto [options] <input bitcode files>

OPTIONS:

Color Options:

  --color                                 - Use colors in output (default=autodetect)

Generic Options:

  --help                                  - Display available options (--help-hidden for more)
  --help-list                             - Display list of available options (--help-list-hidden for more)
  --version                               - Display the version of this program

LTO Options:

  -O <char>                               - Optimization level. [-O0, -O1, -O2, or -O3] (default = '-O2')
  --check-for-objc                        - Only check if the module has objective-C defined in it
  --disable-verify                        - Do not run the verifier during the optimization pipeline
  --dso-symbol=<string>                   - Symbol to put in the symtab in the resulting dso
  --exported-symbol=<string>              - List of symbols to export from the resulting object file
  -j <uint>                               - Number of backend threads
  --list-dependent-libraries-only         - Instead of running LTO, list the dependent libraries in each IR file
  --list-symbols-only                     - Instead of running LTO, list the symbols in each IR file
  --lto-freestanding                      - Enable Freestanding (disable builtins / TLI) during LTO
  -o <filename>                           - Override output filename
  --print-macho-cpu-only                  - Instead of running LTO, print the mach-o cpu in each IR file
  --restore-linkage                       - Restore original linkage of globals prior to CodeGen
  --save-linked-module                    - Write linked LTO module to file before optimize
  --save-merged-module                    - Write merged LTO module to file before CodeGen
  --set-merged-module                     - Use the first input module as the merged module
  --thinlto                               - Only write combined global index for ThinLTO backends
  --thinlto-action=<value>                - Perform a single ThinLTO stage:
    =thinlink                             -   ThinLink: produces the index by linking only the summaries.
    =distributedindexes                   -   Produces individual indexes for distributed backends.
    =emitimports                          -   Emit imports files for distributed backends.
    =promote                              -   Perform pre-import promotion (requires -thinlto-index).
    =import                               -   Perform both promotion and cross-module importing (requires -thinlto-index).
    =internalize                          -   Perform internalization driven by -exported-symbol (requires -thinlto-index).
    =optimize                             -   Perform ThinLTO optimizations.
    =codegen                              -   CodeGen (expected to match llc)
    =run                                  -   Perform ThinLTO end-to-end
  --thinlto-cache-dir=<string>            - Enable ThinLTO caching.
  --thinlto-cache-entry-expiration=<uint> - Set ThinLTO cache entry expiration time.
  --thinlto-cache-max-size-bytes=<ulong>  - Set ThinLTO cache pruning directory maximum size in bytes.
  --thinlto-cache-max-size-files=<int>    - Set ThinLTO cache pruning directory maximum number of files.
  --thinlto-cache-pruning-interval=<int>  - Set ThinLTO cache pruning interval.
  --thinlto-index=<string>                - Provide the index produced by a ThinLink, required to perform the promotion and/or importing.
  --thinlto-index-stats                   - Print statistic for the index in every input files
  --thinlto-module-id=<string>            - For the module ID for the file to process, useful to match what is in the index.
  --thinlto-prefix-replace=<string>       - Control where files for distributed backends are created. Expects 'oldprefix;newprefix' and if path prefix of output file is oldprefix it will be replaced with newprefix.
  --thinlto-save-objects=<string>         - Save ThinLTO generated object files using filenames created in the given directory.
  --thinlto-save-temps=<string>           - Save ThinLTO temp files using filenames created by adding suffixes to the given file path prefix.
  --use-diagnostic-handler                - Use a diagnostic handler to test the handler interface
Options (32)
OptionDescriptionSource
--color- Use colors in output (default=autodetect)help
--help- Display available options (--help-hidden for more)help
--help-list- Display list of available options (--help-list-hidden for more)help
--version- Display the version of this programhelp
-O char- Optimization level.help
--check-for-objc- Only check if the module has objective-C defined in ithelp
--disable-verify- Do not run the verifier during the optimization pipelinehelp
--dso-symbol string- Symbol to put in the symtab in the resulting dsohelp
--exported-symbol string- List of symbols to export from the resulting object filehelp
-j uint- Number of backend threadshelp
--list-dependent-libraries-only- Instead of running LTO, list the dependent libraries in each IR filehelp
--list-symbols-only- Instead of running LTO, list the symbols in each IR filehelp
--lto-freestanding- Enable Freestanding (disable builtins / TLI) during LTOhelp
-o filename- Override output filenamehelp
--print-macho-cpu-only- Instead of running LTO, print the mach-o cpu in each IR filehelp
--restore-linkage- Restore original linkage of globals prior to CodeGenhelp
--save-linked-module- Write linked LTO module to file before optimizehelp
--save-merged-module- Write merged LTO module to file before CodeGenhelp
--set-merged-module- Use the first input module as the merged modulehelp
--thinlto- Only write combined global index for ThinLTO backendshelp
--thinlto-action value- Perform a single ThinLTO stage: =thinlink - ThinLink: produces the index by linking only the summaries.help
--thinlto-cache-dir string- Enable ThinLTO caching.help
--thinlto-cache-max-size-bytes ulong- Set ThinLTO cache pruning directory maximum size in bytes.help
--thinlto-cache-max-size-files int- Set ThinLTO cache pruning directory maximum number of files.help
--thinlto-cache-pruning-interval int- Set ThinLTO cache pruning interval.help
--thinlto-index string- Provide the index produced by a ThinLink, required to perform the promotion and/or importing.help
--thinlto-index-stats- Print statistic for the index in every input fileshelp
--thinlto-module-id string- For the module ID for the file to process, useful to match what is in the index.help
--thinlto-prefix-replace string- Control where files for distributed backends are created.help
--thinlto-save-objects string- Save ThinLTO generated object files using filenames created in the given directory.help
--thinlto-save-temps string- Save ThinLTO temp files using filenames created by adding suffixes to the given file path prefix.help
--use-diagnostic-handler- Use a diagnostic handler to test the handler interfacehelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.