Landing: 6ef69b644ea9

Project / Subsystem

gcc / lto

Date

2026-08-27

Author

Kyrylo Tkachov

Commit

6ef69b644ea98da590e3830a97a9fed3c3044ca3

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
lto
patch_id
—
commit_hash
6ef69b644ea98da590e3830a97a9fed3c3044ca3
source_type
github
headline
LTO: Generated Makefiles mark parallel LTRANS outputs as phony
tldr
LTO builds now correctly handle parallel LTRANS outputs with -save-temps to avoid stale objects.
author
Kyrylo Tkachov
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • lto
  • • optimization
  • • makefile
discussion_id_link
—
bugzilla_pr
—
date
2026-08-27T00:00:00.000Z

When using parallel LTRANS with the -save-temps option, Makefiles generated by the LTO wrapper could produce stale object files. This change marks persistent non-cache LTRANS outputs as ‘phony’ in the Makefile, ensuring that Make reruns the LTRANS recipe for the current link. A new test case verifies the fix, which passed on x86_64 and AArch64.