Skip to content

Add to gcc compiler arg to display colors in gcc output, to generated build tasks.#8165

Merged
Colengms merged 1 commit intomainfrom
coleng/add_gcc_colors
Sep 17, 2021
Merged

Add to gcc compiler arg to display colors in gcc output, to generated build tasks.#8165
Colengms merged 1 commit intomainfrom
coleng/add_gcc_colors

Conversation

@Colengms
Copy link
Contributor

@Colengms Colengms commented Sep 16, 2021

Uses -fdiagnostics-color=always, which causes gcc colors to be used in VS Code's terminal. The default is 'auto', but gcc is unable to detect that colorization is supported by the VS Code terminal.

Looking at code from gcc here: https://code.woboq.org/gcc/gcc/diagnostic-color.c.html
... It looks like colors are likely not determined to be supported in the VS Code terminal due to GetConsoleMode() failing on Windows, and isatty() failing on Linux/Mac.

@Colengms Colengms changed the title Add to gcc compiler args for generated build tasks, to display colors in gcc output Add to gcc compiler arg to display colors in gcc output, to generated build tasks. Sep 16, 2021
@Colengms Colengms merged commit 0e3dd7a into main Sep 17, 2021
@Colengms Colengms deleted the coleng/add_gcc_colors branch September 17, 2021 00:02
@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants