1####################################################### 2## Shared definitions for all target test compilations. 3####################################################### 4 5ifeq ($(LOCAL_GTEST),true) 6 LOCAL_CFLAGS += -DGTEST_OS_LINUX_ANDROID -DGTEST_HAS_STD_STRING 7 8 ifndef LOCAL_SDK_VERSION 9 LOCAL_STATIC_LIBRARIES += libgtest_main libgtest 10 else 11 # TODO(danalbert): Remove the suffix from the module since we only need the 12 # one variant now. 13 my_ndk_gtest_suffix := _c++ 14 LOCAL_STATIC_LIBRARIES += \ 15 libgtest_main_ndk$(my_ndk_gtest_suffix) \ 16 libgtest_ndk$(my_ndk_gtest_suffix) 17 endif 18endif 19 20ifdef LOCAL_MODULE_PATH 21$(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH when building test $(LOCAL_MODULE)) 22endif 23 24ifdef LOCAL_MODULE_PATH_32 25$(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH_32 when building test $(LOCAL_MODULE)) 26endif 27 28ifdef LOCAL_MODULE_PATH_64 29$(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH_64 when building test $(LOCAL_MODULE)) 30endif 31 32use_testcase_folder := false 33ifneq ($(LOCAL_MODULE),$(filter $(LOCAL_MODULE),$(DEFAULT_DATA_OUT_MODULES))) 34 use_testcase_folder := true 35endif 36 37ifneq ($(use_testcase_folder),true) 38ifndef LOCAL_MODULE_RELATIVE_PATH 39LOCAL_MODULE_RELATIVE_PATH := $(LOCAL_MODULE) 40endif 41endif 42 43# Implicitly run this test under MTE SYNC for aarch64 binaries. This is a no-op 44# on non-MTE hardware. 45ifneq (,$(filter arm64,$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH))) 46 LOCAL_WHOLE_STATIC_LIBRARIES += note_memtag_heap_sync 47endif 48