aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/HostUnitTests.mk
diff options
context:
space:
mode:
Diffstat (limited to 'native/jni/HostUnitTests.mk')
-rw-r--r--native/jni/HostUnitTests.mk12
1 files changed, 11 insertions, 1 deletions
diff --git a/native/jni/HostUnitTests.mk b/native/jni/HostUnitTests.mk
index 6967d9b87..e30d50a2e 100644
--- a/native/jni/HostUnitTests.mk
+++ b/native/jni/HostUnitTests.mk
@@ -12,6 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+# Host build is never supported in unbundled (NDK/tapas) build
+ifeq (,$(TARGET_BUILD_APPS))
+
# HACK: Temporarily disable host tool build on Mac until the build system is ready for C++11.
LATINIME_HOST_OSNAME := $(shell uname -s)
ifneq ($(LATINIME_HOST_OSNAME), Darwin) # TODO: Remove this
@@ -26,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
@@ -37,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
@@ -47,10 +54,13 @@ LOCAL_SRC_FILES := $(addprefix $(LATIN_IME_TEST_SRC_DIR)/, $(LATIN_IME_CORE_TEST
LOCAL_STATIC_LIBRARIES += liblatinime_host_static_for_unittests
include $(BUILD_HOST_NATIVE_TEST)
+include $(LOCAL_PATH)/CleanupNativeFileList.mk
+
endif # Darwin - TODO: Remove this
+endif # TARGET_BUILD_APPS
+
#################### Clean up the tmp vars
LATINIME_HOST_OSNAME :=
LATIN_IME_SRC_DIR :=
LATIN_IME_TEST_SRC_DIR :=
-include $(LOCAL_PATH)/CleanupNativeFileList.mk