Work around clang-tidy segmentation fault.
This should affect only builds that call clang-tidy.
Without this change, clang-tidy has segmentation fault
when compiling several files in the incident_* directories.
Bug: 34740546
Test: build with WITH_TIDY=1 and
DEFAULT_GLOBAL_TIDY_CHECKS="*,-readability-*,-google-readability-*,-google-runtime-references"
Change-Id: Idfd46f36c01ccdd401eb54b750bc9d962c29ddeb
diff --git a/Android.mk b/Android.mk
index 63ad83f..fb962a2 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1409,6 +1409,8 @@
# ==== c++ proto host library ==============================
include $(CLEAR_VARS)
LOCAL_MODULE := libplatformprotos
+# b/34740546, work around clang-tidy segmentation fault.
+LOCAL_TIDY_CHECKS := -modernize*
LOCAL_PROTOC_OPTIMIZE_TYPE := full
LOCAL_PROTOC_FLAGS := \
--include_source_info \
diff --git a/tools/incident_report/Android.mk b/tools/incident_report/Android.mk
index 9e56e3d..e57a959 100644
--- a/tools/incident_report/Android.mk
+++ b/tools/incident_report/Android.mk
@@ -34,6 +34,9 @@
libplatformprotos \
libprotobuf-cpp-full
+# b/34740546, work around clang-tidy segmentation fault.
+LOCAL_TIDY_CHECKS := -modernize*
+
LOCAL_C_FLAGS := \
-Wno-unused-parameter
include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/incident_section_gen/Android.mk b/tools/incident_section_gen/Android.mk
index acf3f83..0549026 100644
--- a/tools/incident_section_gen/Android.mk
+++ b/tools/incident_section_gen/Android.mk
@@ -21,6 +21,8 @@
include $(CLEAR_VARS)
LOCAL_MODULE := incident-section-gen
+# b/34740546, work around clang-tidy segmentation fault.
+LOCAL_TIDY_CHECKS := -modernize*
LOCAL_CFLAGS += -g -O0
LOCAL_C_INCLUDES := \
external/protobuf/src