hal: Enable integer overflow sanitizer
Enable integer overflow sanitizer in audio HAL for kona.
Change-Id: I16a81af39c888f9e5c3c10187ad81d29035a8bc0
diff --git a/hal/audio_extn/Android.mk b/hal/audio_extn/Android.mk
index 255bc4e..993c5cb 100644
--- a/hal/audio_extn/Android.mk
+++ b/hal/audio_extn/Android.mk
@@ -50,6 +50,9 @@
LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers
+ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
+LOCAL_SANITIZE := integer_overflow
+endif
include $(BUILD_SHARED_LIBRARY)
#--------------------------------------------
@@ -109,6 +112,9 @@
LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers
+ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
+LOCAL_SANITIZE := integer_overflow
+endif
include $(BUILD_SHARED_LIBRARY)
#-------------------------------------------
@@ -168,6 +174,9 @@
LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers
+ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
+LOCAL_SANITIZE := integer_overflow
+endif
#include $(BUILD_SHARED_LIBRARY)
#--------------------------------------------
@@ -227,6 +236,9 @@
LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers
+ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
+LOCAL_SANITIZE := integer_overflow
+endif
include $(BUILD_SHARED_LIBRARY)
#--------------------------------------------
@@ -282,6 +294,9 @@
LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers
+ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
+LOCAL_SANITIZE := integer_overflow
+endif
include $(BUILD_SHARED_LIBRARY)
#====================================================================================================
# --- enable 3rd Party Spkr-prot lib
@@ -337,6 +352,9 @@
LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers
+ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
+LOCAL_SANITIZE := integer_overflow
+endif
include $(BUILD_SHARED_LIBRARY)
#-------------------------------------------
@@ -395,6 +413,9 @@
LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers
+ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
+LOCAL_SANITIZE := integer_overflow
+endif
include $(BUILD_SHARED_LIBRARY)
#-------------------------------------------
@@ -456,6 +477,9 @@
LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers
+ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
+LOCAL_SANITIZE := integer_overflow
+endif
include $(BUILD_SHARED_LIBRARY)
#-------------------------------------------
@@ -515,6 +539,9 @@
LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers
+ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
+LOCAL_SANITIZE := integer_overflow
+endif
include $(BUILD_SHARED_LIBRARY)
#-------------------------------------------
@@ -577,6 +604,9 @@
LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers
+ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
+LOCAL_SANITIZE := integer_overflow
+endif
include $(BUILD_SHARED_LIBRARY)
#-------------------------------------------
@@ -647,6 +677,9 @@
LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers
+ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
+LOCAL_SANITIZE := integer_overflow
+endif
include $(BUILD_SHARED_LIBRARY)
#-------------------------------------------
@@ -706,6 +739,9 @@
LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers
+ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
+LOCAL_SANITIZE := integer_overflow
+endif
#include $(BUILD_SHARED_LIBRARY)
#-------------------------------------------
@@ -764,6 +800,9 @@
LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers
+ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
+LOCAL_SANITIZE := integer_overflow
+endif
include $(BUILD_SHARED_LIBRARY)
#-------------------------------------------
# Build AUDIOZOOM
@@ -821,6 +860,9 @@
LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers
+ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
+LOCAL_SANITIZE := integer_overflow
+endif
include $(BUILD_SHARED_LIBRARY)