diff options
author | 2014-10-22 19:00:48 +0900 | |
---|---|---|
committer | 2014-10-22 19:08:58 +0900 | |
commit | af2673f17d89c0ea8d61266ce92e55a77218b494 (patch) | |
tree | 431b356649c254ef8b7556c9b80aee31e8625ebc /native | |
parent | 90aa229f01f2a14ae5b4542e065d27d000dafb82 (diff) | |
download | latinime-af2673f17d89c0ea8d61266ce92e55a77218b494.tar.gz latinime-af2673f17d89c0ea8d61266ce92e55a77218b494.tar.xz latinime-af2673f17d89c0ea8d61266ce92e55a77218b494.zip |
Enable ASan (Address Sanitizer) for native host test
This CL enables Address Sanitizer for native host test. Note that
production build is not affected with this change. ASan is enabled
only in static lib for test executables.
Change-Id: Idbe1f2e4502dfce9b6fb0253d7ebda8d37fbf84e
Diffstat (limited to 'native')
-rw-r--r-- | native/jni/HostUnitTests.mk | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/native/jni/HostUnitTests.mk b/native/jni/HostUnitTests.mk index 6967d9b87..9e59283b6 100644 --- a/native/jni/HostUnitTests.mk +++ b/native/jni/HostUnitTests.mk @@ -26,8 +26,10 @@ include $(LOCAL_PATH)/NativeFileList.mk #################### Host library for unit test # TODO: Remove -std=c++11 once it is set by default on host build. LATIN_IME_SRC_DIR := src +LOCAL_ADDRESS_SANITIZER := true LOCAL_CFLAGS += -std=c++11 -Wno-unused-parameter -Wno-unused-function LOCAL_CLANG := true +LOCAL_CXX_STL := libc++ LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR) LOCAL_MODULE := liblatinime_host_static_for_unittests LOCAL_MODULE_TAGS := optional @@ -38,8 +40,10 @@ include $(BUILD_HOST_STATIC_LIBRARY) include $(CLEAR_VARS) LATIN_IME_TEST_SRC_DIR := tests # TODO: Remove -std=c++11 once it is set by default on host build. +LOCAL_ADDRESS_SANITIZER := true LOCAL_CFLAGS += -std=c++11 -Wno-unused-parameter -Wno-unused-function LOCAL_CLANG := true +LOCAL_CXX_STL := libc++ LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR) LOCAL_MODULE := liblatinime_host_unittests LOCAL_MODULE_TAGS := tests |