Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-97327

Should use -fdiagnostics-color for clang/gcc in bazel

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • Fully Compatible

      Similarly to ninja, bazel captures stdout/stderr so the compiler's isatty() check returns false, disabling color. We need to explicitly opt back in to having color. Bazel is also good enough to strip color codes when its output isn't a terminal (tested with bazelisk build src/mongo/base:system_error_with_debug --copt='-fdiagnostics-color' | cat and an induced error) so it is safe to unconditionally enable this.

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: