Disable clang only for the arm target.

Also ignore some clang warnings when compiled for other targets.

BUG: 17167262
Change-Id: Id80f9ba3061ac71387a29df7a28c80468f9e9aee
diff --git a/perf-3.12.0/tools/perf/Android.mk b/perf-3.12.0/tools/perf/Android.mk
index 400e548..30f8414 100644
--- a/perf-3.12.0/tools/perf/Android.mk
+++ b/perf-3.12.0/tools/perf/Android.mk
@@ -134,6 +134,9 @@
 
 common_clang_compiler_flags := \
     -Wno-int-conversion \
+    -Wno-tautological-pointer-compare \
+    -Wno-tautological-constant-out-of-range-compare \
+    -Wno-pointer-bool-conversion \
 
 common_compiler_flags := \
     -include external/linux-tools-perf/android-fixes.h \
@@ -179,9 +182,11 @@
     -DHAVE_ON_EXIT \
 
 include $(CLEAR_VARS)
-# builtin-report.c and builtin-top.c have undefined __aeabi_read_tp
+ifeq ($(TARGET_ARCH),arm)
+# b/17167262, builtin-report.c and builtin-top.c have undefined __aeabi_read_tp
 # when compiled with clang -fpie.
 LOCAL_CLANG := false
+endif
 
 LOCAL_SRC_FILES := $(libperf_src_files)
 
@@ -275,9 +280,11 @@
     tests/perf-time-to-tsc.c \
 
 include $(CLEAR_VARS)
-# builtin-report.c and builtin-top.c have undefined __aeabi_read_tp
+ifeq ($(TARGET_ARCH),arm)
+# b/17167262, builtin-report.c and builtin-top.c have undefined __aeabi_read_tp
 # when compiled with clang -fpie.
 LOCAL_CLANG := false
+endif
 
 LOCAL_SRC_FILES := $(perf_src_files)
 LOCAL_SRC_FILES_x86 := $(perf_src_files_x86)