Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
-no-color option doesn't do anything #2984
It looks like a bsb option.
I want no color when I compile in emacs (because emacs can parse the output and do smart things with it) or redirect the output to a file.
added a commit
Aug 6, 2018
After some thoughts, from the point of the view of the build system, I think it is a mistake to expose such flag, there are multiple reasons for this
To make color configurable, we are going to piggy back the existing environment variable, NINJA_ANSI_FORCED.
When NINJA_ANSI_FORCED is set 1, bsb.exe will produce colors, ninja.exe will produce colors and preserve the ANSI code by bsc.exe, note bsc.exe will be passed flag "-color always"
When NINJA_ANSI_FORCED is set 0, bsb.exe will not produce colors, ninja.exe will not produce colors and it will try to strip ANSI code by bsc.exe, note bsc.exe will still be passed a flag "-color always"
When NINJA_ANSI_FORCED is unset, bsb.exe will produce colors based on terminal test, this is the same with ninja.exe, note bsc.exe will still be passed a flag "-color always"
The take away is that bsc.exe will be always passed a flag "-color always", it will be determined in the runtime to strip ansi code or not, so that the build system(generated build.ninja) will not be affected.