commit | 14e3bec8fc3e1f10c3dc57277ae3dbf9a4087b1c | [log] [tgz] |
---|---|---|
author | Paul Kirth <paulkirth@google.com> | Mon Jul 24 20:14:17 2023 +0000 |
committer | Paul Kirth <paulkirth@google.com> | Fri Aug 18 22:51:25 2023 +0000 |
tree | 72ee6ebaf2c15517a5cee0febc2dbd6d30a27259 | |
parent | b6e148f02ca8c9b3d32914c2abafc773b9727223 [diff] |
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, 29112a994694baee070a2021e00f772f1913d214 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
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, or #llvm IRC channel on OFTC.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.