gecko-dev/build
Gregory Szorc 4732e7cb34 Bug 1171610 - Automatically enable color in compiler output; r=glandium
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
2016-11-09 14:01:24 -08:00
..
annotationProcessors Bug 1291375 - 2. Let AnnotationProcessor generate multiple sets of bindings; r=snorp 2016-09-16 15:13:47 -04:00
autoconf Bug 1200740 - Import blacklist for ASan on Windows to avoid instrumenting selected sandbox functions and files. r=glandium 2016-11-10 09:18:55 +08:00
build-clang Bug 1306650 - part 14 - correct tar package substitution for new taskcluster scheme; r=ehsan 2016-10-26 16:18:23 -04:00
clang-plugin Bug 1299615 - Part 2: Skip ICU source directory in Clang build plugin when searching for implicit conversion constructors. r=Waldo, r=mystor 2016-11-03 05:45:39 -07:00
compare-mozconfig bug 1255479 - make mach python-tests use TestResolver for discovery, make mach test work for python tests. r=nalexander 2016-03-10 12:30:10 -05:00
docs Bug 1316477 - Mention adding extern crate references. r=froydnj 2016-11-09 18:30:03 -08:00
macosx Bug 1291028 - add build script for custom Mac linker; r=mshal 2016-08-04 01:24:40 -04:00
mobile Bug 1309436 - Add test name to java-exception failure messages; r=ted 2016-10-26 11:31:41 -06:00
moz.configure Bug 1171610 - Automatically enable color in compiler output; r=glandium 2016-11-09 14:01:24 -08:00
package/mac_osx
pgo Bug 1293837 - Followup to fix 32-bit PGO builds r=me 2016-08-11 14:40:59 -07:00
pymake
release Bug 1304829 - rename RELEASE_BUILD to RELEASE_OR_BETA: main part. r=ted,Mossop 2016-10-08 11:14:49 +02:00
sanitizers Bug 1317471: Add the sandbox's interceptors_64.cc to Windows ASan blacklist. r=froydnj DONTBUILD 2016-11-14 16:43:51 -06:00
unix Bug 1272629 - Add taskcluster task to build binutils package; r=glandium 2016-09-14 18:47:50 -07:00
util bug 1272503 - make alerting for changes in num_constructors more agressive r=froydnj f=wlach 2016-05-31 16:49:15 -04:00
valgrind Bug 1309851 - Fix "Intermittent valgrind-test | Valgrind timed out (reached 1800 second limit)". r=n.nethercote@gmail.com. 2016-11-10 11:25:19 +01:00
win32 Bug 1283203 - Update to Visual Studio 2015 Update 3, SDK 10.14393.0; r=glandium 2016-09-09 10:35:15 -07:00
win64 Bug 1283203 - Update to Visual Studio 2015 Update 3, SDK 10.14393.0; r=glandium 2016-09-09 10:35:15 -07:00
__init__.py
.gdbinit_python.in bug 985566 - add some pretty printers to .gdbinit r=froydnj r=glandium 2016-06-02 13:33:07 -04:00
.lldbinit.in
appini_header.py Bug 1269787 - Move appini_header.py rule to moz.build; r=glandium 2016-04-29 13:45:07 -04:00
application.ini Bug 1247162 - Generate a header defining MOZ_SOURCE_*. r=mshal 2016-02-12 07:16:14 +09:00
automation-build.mk Bug 1224490 - Kill LIBXUL_DIST. r=mshal 2015-11-17 10:00:19 +09:00
automation.py.in Bug 1311397: fix DataChannel logging for mochitests/etc r=erahm 2016-10-28 03:25:10 -04:00
binary-location.mk
buildconfig.py Bug 1278415 - Make the buildconfig module use MozbuildObject.from_environment. r=gps 2016-06-16 11:43:35 +09:00
checksums.py
defines.sh
dumbmake-dependencies Bug 1218612 - DevTools server/shared updated in dumbmake. r=fitzgen 2015-10-27 16:28:10 -05:00
gecko_templates.mozbuild Bug 1309573 - Part 2: Define MOZ_HAS_MOZGLUE in various places so that the crash reason gets used. r=glandium 2016-11-08 03:53:00 -05:00
gen_test_packages_manifest.py Backed out 6 changesets (bug 1286900) for making wpt-7 permanently fail on Windows debug 2016-09-27 18:24:38 -07:00
genrc.sh
gyp.mozbuild Bug 1310956 - Use arm64 for target_arch into GYP. r=glandium 2016-10-21 14:48:24 +09:00
mach_bootstrap.py Bug 1303590 - Remove Luciddream test suite r=aobreja 2016-09-23 09:20:54 -04:00
Makefile.in Bug 1269787 - Move appini_header.py rule to moz.build; r=glandium 2016-04-29 13:45:07 -04:00
moz-automation.mk Bug 1311462 - Dump symbols from */dist/bin instead of dist/universal for Mac universal builds. r=ted 2016-11-01 14:05:27 +09:00
moz.build Bug 1301076 - remove stlport support from the build system and stlport code; r=glandium 2016-09-21 19:21:40 -04:00
mozconfig.automation
mozconfig.cache Bug 1315330 - Enable sccache for autoland; r=ted 2016-11-04 11:49:20 -07:00
mozconfig.clang-cl Bug 1042132 - Part 3: Add a MOZCONFIG helper script that lets you pick clang-cl; r=rail 2016-02-08 14:55:31 -05:00
mozconfig.common Bug 1186522 - force per checkin and release desktop firefox builds to require signed add-ons on beta 47 r=mshal 2016-04-27 12:46:52 -04:00
mozconfig.common.override
mozconfig.rust Bug 1249511 - Make tooltool cargo available in the environment. r=mshal 2016-07-22 13:23:29 -04:00
mozconfig.vs-common
mozconfig.win-common
prebuilt-interfaces.manifest Bug 1240134 - Incorporate the interfaces.xpt from downloaded artifacts instead of building XPIDL during an artifact build. r=glandium 2016-08-17 15:02:31 -07:00
qemu-wrap
sccache.mk
subconfigure.py Bug 1269517 - Fix various environment variables that may contain posix-style paths when invoking the js subconfigure. r=glandium 2016-07-26 15:27:19 -07:00
submit_telemetry_data.py Bug 1250656 - Don't block mach command completion when submitting build telemetry data r=gps 2016-02-24 15:11:58 -08:00
telemetry-schema.json Bug 1244160 - Create json-schema for build telemetry data r=gps 2016-02-02 09:32:49 -05:00
templates.mozbuild Bug 1301076 - remove stlport support from the build system and stlport code; r=glandium 2016-09-21 19:21:40 -04:00
test_templates.mozbuild Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
update-settings.ini
upload.py Bug 1307482 - Upload files concurrently; r=ted 2016-10-04 09:22:22 -07:00
variables.py Bug 1274655 - Resolve changeset when only repo is defined; r=mshal 2016-05-24 11:35:44 -07:00
virtualenv_packages.txt bug 1294565 - add some more helpers to mozversioncontrol, add MozbuildObject.repository. r=gps 2016-09-29 06:48:37 -04:00
windows_toolchain.py Bug 1283203 - Package Windows 10 Anniversary Update SDK; r=glandium 2016-09-09 09:55:44 -07:00