From 6744a5cedfca2964e19a204e9cb7acbe55937dda Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 14 Jul 2017 12:45:27 -0700 Subject: Always pass --root to cpplint Mac builds were sometimes flaky when running cpplint.py because the .git directory is sometimes removed when the disk is almost full, which causes cpplint.py to fail to autodetect the project root. Change "Pass --root to cpplint." (I6d418979a9bdceefc7a2c19297a7cc9aacb3e83f) fixed a similar problem when running inside of gitc, which doesn't have .git directories, but use ANDROID_BUILD_TOP, which is only set if lunch has been run. It also didn't set --root for some of the phony targets. Bug: 34787652 Test: m -j cpplint-art-phony Change-Id: Ie0eb9d9d038f56a661750bb0f782321aba314a37 --- build/Android.cpplint.mk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'build/Android.cpplint.mk') diff --git a/build/Android.cpplint.mk b/build/Android.cpplint.mk index f924a855b7..66ac897f76 100644 --- a/build/Android.cpplint.mk +++ b/build/Android.cpplint.mk @@ -18,7 +18,8 @@ include art/build/Android.common_build.mk ART_CPPLINT := $(LOCAL_PATH)/tools/cpplint.py ART_CPPLINT_FILTER := --filter=-whitespace/line_length,-build/include,-readability/function,-readability/streams,-readability/todo,-runtime/references,-runtime/sizeof,-runtime/threadsafe_fn,-runtime/printf -ART_CPPLINT_FLAGS := --quiet --root=$(ANDROID_BUILD_TOP) +ART_CPPLINT_FLAGS := --root=$(TOP) +ART_CPPLINT_QUIET := --quiet ART_CPPLINT_INGORED := \ runtime/elf.h \ runtime/openjdkjvmti/include/jvmti.h @@ -32,12 +33,12 @@ ART_CPPLINT_SRC := $(filter-out $(patsubst %,$(LOCAL_PATH)/%,$(ART_CPPLINT_INGOR # "mm cpplint-art" to verify we aren't regressing .PHONY: cpplint-art cpplint-art: - $(ART_CPPLINT) $(ART_CPPLINT_FILTER) $(ART_CPPLINT_SRC) + $(ART_CPPLINT) $(ART_CPPLINT_FLAGS) $(ART_CPPLINT_FILTER) $(ART_CPPLINT_SRC) # "mm cpplint-art-all" to see all warnings .PHONY: cpplint-art-all cpplint-art-all: - $(ART_CPPLINT) $(ART_CPPLINT_SRC) + $(ART_CPPLINT) $(ART_CPPLINT_FLAGS) $(ART_CPPLINT_SRC) OUT_CPPLINT := $(TARGET_COMMON_OUT_ROOT)/cpplint @@ -48,7 +49,7 @@ art_cpplint_file := $(1) art_cpplint_touch := $$(OUT_CPPLINT)/$$(subst /,__,$$(art_cpplint_file)) $$(art_cpplint_touch): $$(art_cpplint_file) $(ART_CPPLINT) art/build/Android.cpplint.mk - $(hide) $(ART_CPPLINT) $(ART_CPPLINT_FLAGS) $(ART_CPPLINT_FILTER) $$< + $(hide) $(ART_CPPLINT) $(ART_CPPLINT_QUIET) $(ART_CPPLINT_FLAGS) $(ART_CPPLINT_FILTER) $$< $(hide) mkdir -p $$(dir $$@) $(hide) touch $$@ -- cgit v1.2.3-59-g8ed1b