From 9f27cc0af580a9ab502098bcd645f6b1cd65c965 Mon Sep 17 00:00:00 2001 From: Sasha Smundak Date: Thu, 31 Jan 2019 13:25:31 -0800 Subject: [PATCH] Provide an option to reduce build verbosity If ANDROID_QUIET_BUILD environment variable is set, do not print build timing and colorized summary result. Test: treehugger Change-Id: I7ae3f8eb407df470837560706f06e5785911828c --- envsetup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/envsetup.sh b/envsetup.sh index 4947bf0219..a03f02de58 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -35,6 +35,7 @@ Environment options: - SANITIZE_HOST: Set to 'true' to use ASAN for all host modules. Note that ASAN_OPTIONS=detect_leaks=0 will be set by default until the build is leak-check clean. +- ANDROID_QUIET_BUILD: set to 'true' to display only the essential messages. Look at the source to view more functions. The complete list is: EOF @@ -1603,6 +1604,10 @@ function get_make_command() function _wrap_build() { + if [[ "${ANDROID_QUIET_BUILD:-}" == true ]]; then + "$@" + return $? + fi local start_time=$(date +"%s") "$@" local ret=$?