LLVM Lands Initial Support For Fat LTO Objects

Written by Michael Larabel in LLVM on 2 July 2023 at 07:10 AM EDT. 5 Comments
LLVM
In a move similar to GCC's implementation, LLVM Git landed this week initial support for fat LTO objects. This "-ffat-lto-objects" support will be found with the LLVM/Clang 17 release this autumn.

Enabling the compiler's fat LTO object support allows for the compiler IR to be saved along with the final object code. This allows these "fat" objects to be used for both development builds and production of optimized builds at the cost of increased object size and longer build times. It's then at the link time phase where it's determined whether to discard the link-time optimization (LTO) information or if it's to be used.

LLVM mascot


GCC has supported fat LTO objects for a while but finally this week LLVM Git landed support for fat LTO objects with its implementation similar to that of the GNU Compiler Collection. The commit adding the preliminary fat LTO support explains:
"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 flag functional in the same way as GCC's."

This will be alongside many other new compiler features when LLVM 17 debuts around September if it's usual release cadence holds.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week