LLVM Lands Initial Support For Fat LTO Objects
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.
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:
This will be alongside many other new compiler features when LLVM 17 debuts around September if it's usual release cadence holds.
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.
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.
5 Comments