Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cgo build failures with specific GCC flags (#2097)
cgo runs the compiler over a test file as part of the build process. It then parses the compiler errors. This requires the compiler to be configured well enough to work for cgo. -fdiagnostics-color is another way to enable color support on GCC. This adds colors unconditionally to the output (bazel doesn't present a TTY, so to get colors with bazel, you need to force them on). -fmax-errors=... is a way to prevent GCC from completely flooding your terminal when something goes wrong. A missed semicolon or misplaced {} can cause thousands of lines of errors. This can stop showing errors before cgo sees all the errors it is looking for. We want to strip it out too.
- Loading branch information