From 5f89212e246b387d983987edf0bf514385d0fa71 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 17 Apr 2017 14:59:43 -0700 Subject: [PATCH] Filter and colorize javac output V3 Add soong_javac_wrapper to all javac commands. soong_javac_wrapper colorizes javac output, and hides noisy messages. Previously attempted in I7e8fcd2e4e1ed3ff530a8ccfe931ceb7e411e0ad and I449a61ed2c95b3e1afd51a31a11baab15d97e2f2. Test: m -j ANDROID_COMPILE_WITH_JACK=false Change-Id: I9d7a20d766fadab323a4cf95e5734741b3f578bb --- core/config.mk | 2 ++ core/definitions.mk | 2 +- core/host_dalvik_java_library.mk | 4 +++- core/host_java_library.mk | 3 ++- core/java.mk | 3 ++- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/core/config.mk b/core/config.mk index f033ad9f5..884be1e4f 100644 --- a/core/config.mk +++ b/core/config.mk @@ -499,6 +499,8 @@ SOONG_ZIP := $(SOONG_HOST_OUT_EXECUTABLES)/soong_zip ZIP2ZIP := $(SOONG_HOST_OUT_EXECUTABLES)/zip2zip FILESLIST := $(SOONG_HOST_OUT_EXECUTABLES)/fileslist +SOONG_JAVAC_WRAPPER := $(SOONG_HOST_OUT_EXECUTABLES)/soong_javac_wrapper + # Always use prebuilts for ckati and makeparallel prebuilt_build_tools := prebuilts/build-tools ifeq ($(filter address,$(SANITIZE_HOST)),) diff --git a/core/definitions.mk b/core/definitions.mk index e6f4b0003..72c27af7f 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -2206,7 +2206,7 @@ $(if $(PRIVATE_HAS_RS_SOURCES), \ $(hide) tr ' ' '\n' < $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list \ | $(NORMALIZE_PATH) | sort -u > $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq $(hide) if [ -s $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq ] ; then \ - $(1) -encoding UTF-8 \ + $(SOONG_JAVAC_WRAPPER) $(1) -encoding UTF-8 \ $(if $(findstring true,$(PRIVATE_WARNINGS_ENABLE)),$(xlint_unchecked),) \ $(2) \ $(addprefix -classpath ,$(strip \ diff --git a/core/host_dalvik_java_library.mk b/core/host_dalvik_java_library.mk index a7c1ad692..7101229e9 100644 --- a/core/host_dalvik_java_library.mk +++ b/core/host_dalvik_java_library.mk @@ -97,7 +97,9 @@ $(full_classes_compiled_jar): \ $(jar_manifest_file) \ $(proto_java_sources_file_stamp) \ $(annotation_processor_deps) \ - $(LOCAL_ADDITIONAL_DEPENDENCIES) + $(NORMALIZE_PATH) \ + $(LOCAL_ADDITIONAL_DEPENDENCIES) \ + | $(SOONG_JAVAC_WRAPPER) $(transform-host-java-to-package) my_desugaring := diff --git a/core/host_java_library.mk b/core/host_java_library.mk index 9f640b078..35dece4d0 100644 --- a/core/host_java_library.mk +++ b/core/host_java_library.mk @@ -76,7 +76,8 @@ $(full_classes_compiled_jar): \ $(proto_java_sources_file_stamp) \ $(annotation_processor_deps) \ $(NORMALIZE_PATH) \ - $(LOCAL_ADDITIONAL_DEPENDENCIES) + $(LOCAL_ADDITIONAL_DEPENDENCIES) \ + | $(SOONG_JAVAC_WRAPPER) $(transform-host-java-to-package) javac-check : $(full_classes_compiled_jar) diff --git a/core/java.mk b/core/java.mk index b9c48c6b4..78c8ba3e1 100644 --- a/core/java.mk +++ b/core/java.mk @@ -439,7 +439,8 @@ $(full_classes_compiled_jar): \ $(proto_java_sources_file_stamp) \ $(annotation_processor_deps) \ $(NORMALIZE_PATH) \ - $(LOCAL_ADDITIONAL_DEPENDENCIES) + $(LOCAL_ADDITIONAL_DEPENDENCIES) \ + | $(SOONG_JAVAC_WRAPPER) $(transform-java-to-classes.jar) javac-check : $(full_classes_compiled_jar)