Skip to content

Make gcc diagnostics color output work the same as for rustc#2758

Merged
sylvestre merged 1 commit into
mozilla:mainfrom
jwidauer:fix-gcc-color-output
Jul 1, 2026
Merged

Make gcc diagnostics color output work the same as for rustc#2758
sylvestre merged 1 commit into
mozilla:mainfrom
jwidauer:fix-gcc-color-output

Conversation

@jwidauer

@jwidauer jwidauer commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

When using sccache with gcc using the -fdiagnostics-color=auto flag, there is currently no color output being shown.
This is due to gcc not outputting colors, when standard error is not a terminal, which is the case when using sccache.

This PR addresses this behavior, by making sccache behave similarly for gcc as for rustc. When the -fdiagnostics-color flag is specified, it will remove this flag from the arguments and add it back as -fdiagnostics-color=always, if the color_mode is set to On or Auto.

Please let me know if there is anything I should change or might not have considered!

@codecov-commenter

codecov-commenter commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.19%. Comparing base (68cd330) to head (105a89b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2758      +/-   ##
==========================================
+ Coverage   74.18%   74.19%   +0.01%     
==========================================
  Files          71       71              
  Lines       40491    40505      +14     
==========================================
+ Hits        30037    30052      +15     
+ Misses      10454    10453       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jwidauer jwidauer force-pushed the fix-gcc-color-output branch from 13a6c08 to 105a89b Compare July 1, 2026 14:31
@sylvestre sylvestre merged commit 3a85b1a into mozilla:main Jul 1, 2026
51 checks passed
@jwidauer jwidauer deleted the fix-gcc-color-output branch July 2, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants