llvm-capstone/lld
Paul Kirth 14e3bec8fc Reland "[lld] Preliminary fat-lto-object support"
This patch adds support to lld for --fat-lto-objects. We add a new
--fat-lto-objects option to LLD, and slightly change how it chooses input
files in the driver when the option is set.

Fat LTO objects contain both LTO compatible IR, as well as generated object
code. This allows users to defer the choice of whether to use LTO or not to
link-time. This is a feature available in GCC for some time, and makes the
existing -ffat-lto-objects option functional in the same way as GCC's.

If the --fat-lto-objects option is passed to LLD and the input files are fat
object files, then the linker will chose the LTO compatible bitcode sections
embedded within the fat object and link them together using LTO. Otherwise,
standard object file linking is done using the assembly section in the object
files.

The previous version of this patch had a missing `REQUIRES: x86` line in
`fatlto.invalid.s`. Additionally, it was reported that this patch caused
a test failure in `export-dynamic-symbols.s`, however,
29112a9946 disabled the
`export-dynamic-symbols.s` test on Windows due to a quotation difference
between platforms, unrelated to this patch.

Original RFC: https://discourse.llvm.org/t/rfc-ffat-lto-objects-support/63977

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D146778
2023-08-18 22:51:25 +00:00
..
cmake/modules
COFF Reapply "[Option] Add "Visibility" field and clone the OptTable APIs to use it" 2023-08-15 01:16:58 -07:00
Common [GlobPattern] Update invalid glob pattern diagnostic for unmatched '[' 2023-08-08 20:25:10 -07:00
docs Reland "[lld] Preliminary fat-lto-object support" 2023-08-18 22:51:25 +00:00
ELF Reland "[lld] Preliminary fat-lto-object support" 2023-08-18 22:51:25 +00:00
include/lld/Common
MachO Reapply "[Option] Add "Visibility" field and clone the OptTable APIs to use it" 2023-08-15 01:16:58 -07:00
MinGW Reapply "[Option] Add "Visibility" field and clone the OptTable APIs to use it" 2023-08-15 01:16:58 -07:00
test Reland "[lld] Preliminary fat-lto-object support" 2023-08-18 22:51:25 +00:00
tools/lld
unittests
utils
wasm [lld][WebAssembly] Add support for -soname 2023-08-15 18:33:45 -07:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT
LICENSE.TXT
README.md

LLVM Linker (lld)

This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.

lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.

Benchmarking

In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.

It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz

The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f.