Dan Albert | 36b6f04 | 2015-07-30 16:56:30 -0700 | [diff] [blame^] | 1 | ########################################### |
| 2 | ## A thin wrapper around BUILD_EXECUTABLE |
| 3 | ## Common flags for fuzz tests are added. |
| 4 | ########################################### |
| 5 | |
| 6 | ifdef LOCAL_SDK_VERSION |
| 7 | $(error $(LOCAL_PATH): $(LOCAL_MODULE): NDK fuzz tests are not supported.) |
| 8 | endif |
| 9 | |
| 10 | LOCAL_CFLAGS += -fsanitize-coverage=edge,indirect-calls,8bit-counters |
| 11 | LOCAL_STATIC_LIBRARIES += libLLVMFuzzer |
| 12 | |
| 13 | ifdef LOCAL_MODULE_PATH |
| 14 | $(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH when building test $(LOCAL_MODULE)) |
| 15 | endif |
| 16 | |
| 17 | ifdef LOCAL_MODULE_PATH_32 |
| 18 | $(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH_32 when building test $(LOCAL_MODULE)) |
| 19 | endif |
| 20 | |
| 21 | ifdef LOCAL_MODULE_PATH_64 |
| 22 | $(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH_64 when building test $(LOCAL_MODULE)) |
| 23 | endif |
| 24 | |
| 25 | LOCAL_MODULE_PATH_64 := $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE) |
| 26 | LOCAL_MODULE_PATH_32 := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE) |
| 27 | |
| 28 | ifndef LOCAL_MULTILIB |
| 29 | ifndef LOCAL_32_BIT_ONLY |
| 30 | LOCAL_MULTILIB := both |
| 31 | endif |
| 32 | endif |
| 33 | |
| 34 | include $(BUILD_EXECUTABLE) |