Landing: 619a5e558675

Project / Subsystem

gcc / driver

Date

2026-06-11

Author

Sunil Dora

Commit

619a5e5586759a3ed16baf1333728664b06b0451

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
driver
patch_id
commit_hash
619a5e5586759a3ed16baf1333728664b06b0451
source_type
github
headline
Spill long COLLECT_GCC_OPTIONS to a response file
tldr
GCC's driver now writes excessively long `COLLECT_GCC_OPTIONS` to a temporary response file to circumvent operating system argument limits, preventing build fa…
author
Sunil Dora
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • build-system
  • driver
  • portability
discussion_id_link
bugzilla_pr
date
2026-06-11T00:00:00.000Z

Operating systems impose limits on the length of command-line arguments and environment variables. To prevent GCC builds from failing when the COLLECT_GCC_OPTIONS environment variable exceeds these limits (e.g., 128KB on Linux, 32KB on Windows), the compiler driver now automatically spills these options to a temporary response file. The driver then sets COLLECT_GCC_OPTIONS to @<path> to this file, which collect2, lto-wrapper, and lto-plugin transparently expand, ensuring that large option sets can be handled without breaking the build.