FRIDAY, AUGUST 14, 2026
lto
Incremental linking tests fixed for wrapped targets
LTO incremental link tests now correctly exclude wrapper objects for wrapped targets.
Tests for LTO’s incremental linking mode have been fixed for targets using object file wrappers. Previously, these wrapper objects were incorrectly included during the incremental link step. This change ensures that the wrapper, which doesn’t contain LTO sections, is excluded, leading to more accurate test results.
In Details
In lto.exp, the lto-link-and-maybe-run function was modified to unset the gluefile variable before performing an incremental link. This addresses an issue where wrapper objects, used in targets with gluefile support, were incorrectly passed to the incremental linker, even though they lack LTO sections and are not needed for this stage.
For Context
- LTO
- Link-Time Optimization. A compiler optimization technique where the linker performs optimizations on the entire program after all compilation units have been translated into intermediate code.
- incremental link
- A linking process that updates an executable or library by incorporating only the changes made since the last link, rather than relinking everything from scratch.
- wrapper object
- A special object file used by some build systems or targets to encapsulate or preprocess the linking stage, often used in conjunction with features like glue files.
- gluefile
- A file used in some toolchain configurations to manage linking details, particularly for embedded or specialized targets, often acting as a wrapper or directive provider for the linker.