mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
4732e7cb34
GCC and Clang will colorize compiler output automatically if stdout is a TTY. Unfortunately, when the build backend is invoked via `mach`, stdout is not a TTY. 6e9a4c0b9cd8 (bug 1315785) changed mach so it exports an environment variable indicating whether mach's original stdout is a TTY. This was later used to add color flags to `cargo` invocations. Building on that work, this patch adds color flags to compiler invocations if the compiler supports color and a mach TTY is detected. The result is that compiler output from `mach build` will be colorized automatically if Clang or a modern version of GCC is used. The only issue I see with this is that Clang doesn't "unset" its color sequences when printing a newline. As a result, mach's time line prefixing can sometimes inherit "bold" or other stylings. AFAICT this is only a minor cosmetic concern. GCC does not exhibit this issue. MozReview-Commit-ID: 5Icu6aXGZBL --HG-- extra : rebase_source : 5b2bf5a287fdf8075b3d7dde36b91f3c65b60728 |
||
---|---|---|
.. | ||
external | ||
faster | ||
makefiles | ||
Moz | ||
tests | ||
android-common.mk | ||
autoconf-js.mk.in | ||
autoconf.mk.in | ||
baseconfig.mk | ||
check_js_msg_encoding.py | ||
check_macroassembler_style.py | ||
check_source_count.py | ||
check_spidermonkey_style.py | ||
check_utils.py | ||
check_vanilla_allocations.py | ||
config.mk | ||
createprecomplete.py | ||
doxygen.cfg.in | ||
emptyvars-js.mk.in | ||
emptyvars.mk.in | ||
expandlibs_config.py | ||
expandlibs_exec.py | ||
expandlibs_gen.py | ||
expandlibs.py | ||
find_OOM_errors.py | ||
gcc_hidden.h | ||
gcc-stl-wrapper.template.h | ||
install.bat | ||
link.py | ||
make-stl-wrappers.py | ||
Makefile.in | ||
milestone.txt | ||
moz.build | ||
mozunit.py | ||
MozZipFile.py | ||
msvc-stl-wrapper.template.h | ||
nsinstall.c | ||
nsinstall.py | ||
pathsub.c | ||
pathsub.h | ||
printconfigsetting.py | ||
printprereleasesuffix.py | ||
pythonpath.py | ||
rebuild_check.py | ||
recurse.mk | ||
rules.mk | ||
static-checking-config.mk | ||
stl-headers | ||
string-format.js | ||
system-headers | ||
version_win.pl | ||
version.mk |