Re: RFC: Should -fplugin and -fplugin-arg options be excluded from DW_AT_producer recording?

Project / Subsystem

gcc / gcc

Date

2026-08-14

Proposer

Richard Biener <richard.guenther@gmail.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Improved build reproducibility vs. potentially losing detailed plugin invocation information in debug data.

All attributes

project
gcc
subsystem
gcc
patch_id
—
discussion_id
CAFiYyc03wuxRL=CuTr7jSNkMjWiqKaBLikdcjGfKzP2=nvQiCA@mail.gmail.com
source_type
public_inbox
title
Re: RFC: Should -fplugin and -fplugin-arg options be excluded from DW_AT_producer recording?
headline
Exclude -fplugin and -fplugin-arg from DW_AT_producer recording
tldr
RFC to prevent absolute plugin paths and arguments from being embedded in DWARF debug info, improving build reproducibility.
proposer
Richard Biener <richard.guenther@gmail.com>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
  • • Improved build reproducibility vs. potentially losing detailed plugin invocation information in debug data.
series_id
—
series_role
standalone
series_parts
[]
tags
  • • dwarf
  • • debug info
  • • reproducibility
  • • compiler
  • • gcc
bugzilla_url
—
date
2026-08-14T00:00:00.000Z

Re: RFC: Should -fplugin and -fplugin-arg options be excluded from DW_AT_producer recording?

This RFC proposes excluding GCC plugin-related options (-fplugin= and -fplugin-arg-*) from being recorded in the DW_AT_producer DWARF attribute when -grecord-gcc-switches is enabled. The current behavior embeds absolute host-specific paths, which negatively impacts build reproducibility. The patch modifies gcc/common.opt to mark these options with NoDWARFRecord, addressing the issue without affecting plugin functionality.