Bug 1358597 - always make Cargo verbose in automation; r=ted.mielczarek
authorNathan Froyd <froydnj@mozilla.com>
Fri, 21 Apr 2017 22:25:59 -0400
changeset 566733 ff6efb59ef86ec55931c0cbf88da9d6fe0837bf0
parent 566732 f19ee0e2d1986a5514da46381c70ee5fb5f0ed1b
child 566734 22c3bc2c8ce67427f3cb55ddca0748d4d9322d0b
push id55308
push userbmo:rajesh.kathiriya507@gmail.com
push dateSat, 22 Apr 2017 10:15:05 +0000
reviewersted.mielczarek
bugs1358597
milestone55.0a1
Bug 1358597 - always make Cargo verbose in automation; r=ted.mielczarek This change brings Cargo closer to what our C/C++ build already does, and some forms of Cargo failure are only diagnosed when you pass `--verbose`, so let's eliminate that extra step for people.
config/rules.mk
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -909,17 +909,21 @@ cargo_build_flags = $(CARGOFLAGS)
 ifndef MOZ_DEBUG_RUST
 cargo_build_flags += --release
 endif
 cargo_build_flags += --frozen
 
 cargo_build_flags += --manifest-path $(CARGO_FILE)
 ifdef BUILD_VERBOSE_LOG
 cargo_build_flags += --verbose
-endif
+else
+ifdef MOZ_AUTOMATION
+cargo_build_flags += --verbose
+endif # MOZ_AUTOMATION
+endif # BUILD_VERBOSE_LOG
 
 # Enable color output if original stdout was a TTY and color settings
 # aren't already present. This essentially restores the default behavior
 # of cargo when running via `mach`.
 ifdef MACH_STDOUT_ISATTY
 ifeq (,$(findstring --color,$(cargo_build_flags)))
 cargo_build_flags += --color=always
 endif