Enable Address Sanitizer for native host test 2nd try
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: I2c8e99b8c55e611e86f74579f24a63ac949bb02d
This commit is contained in:
parent
2811592934
commit
5c4bec31d1
1 changed files with 4 additions and 0 deletions
|
@ -29,8 +29,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
|
||||
|
@ -40,9 +42,11 @@ include $(BUILD_HOST_STATIC_LIBRARY)
|
|||
#################### Host native tests
|
||||
include $(CLEAR_VARS)
|
||||
LATIN_IME_TEST_SRC_DIR := tests
|
||||
LOCAL_ADDRESS_SANITIZER := true
|
||||
# TODO: Remove -std=c++11 once it is set by default on host build.
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue