1 ########################################### 2 ## A thin wrapper around BUILD_EXECUTABLE 3 ## Common flags for fuzz tests are added. 4 ########################################### 5 $(call record-module-type,FUZZ_TEST) 6 7 ifdef LOCAL_SDK_VERSION 8 $(error $(LOCAL_PATH): $(LOCAL_MODULE): NDK fuzz tests are not supported.) 9 endif 10 11 LOCAL_CFLAGS += -fsanitize-coverage=trace-pc-guard 12 LOCAL_STATIC_LIBRARIES += libFuzzer 13 14 ifdef LOCAL_MODULE_PATH 15 $(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH when building test $(LOCAL_MODULE)) 16 endif 17 18 ifdef LOCAL_MODULE_PATH_32 19 $(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH_32 when building test $(LOCAL_MODULE)) 20 endif 21 22 ifdef LOCAL_MODULE_PATH_64 23 $(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH_64 when building test $(LOCAL_MODULE)) 24 endif 25 26 LOCAL_MODULE_PATH_64 := $(TARGET_OUT_DATA_NATIVE_TESTS)/fuzzers/$(LOCAL_MODULE) 27 LOCAL_MODULE_PATH_32 := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS)/fuzzers/$(LOCAL_MODULE) 28 29 ifndef LOCAL_MULTILIB 30 ifndef LOCAL_32_BIT_ONLY 31 LOCAL_MULTILIB := both 32 endif 33 endif 34 35 include $(BUILD_EXECUTABLE) 36