[clang] [flang] [flang][Driver] Support -fdiagnostics-color (PR #109210)
Tarun Prabhu via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 19 03:33:12 PDT 2024
tarunprabhu wrote:
> Is `-fdiagnostics-color=auto` too host-environment dependent to test?
I am not sure how I could reliably test it across platforms. One way to do it on Unix could be
```
$ flang -### -diagnostics-color=auto %s | grep -Eqv '"-fc1".+"-fcolor-diagnostics"'
```
The pipe to grep would turn colors off.
On the other hand, I don't know if `REQUIRES: shell` ensures that the shell always has color support. If it does not guarantee that, the "normal" approach - similar to the way `-fdiagnostics-color=always` is tested - might not work. I don't have access to any non-fairly-modern-Linux'es on which I could test this either.
https://github.com/llvm/llvm-project/pull/109210
More information about the cfe-commits
mailing list