2015-07-31 01:56:30 +02:00
|
|
|
###########################################
|
|
|
|
## A thin wrapper around BUILD_EXECUTABLE
|
|
|
|
## Common flags for fuzz tests are added.
|
|
|
|
###########################################
|
2016-07-26 01:03:53 +02:00
|
|
|
$(call record-module-type,FUZZ_TEST)
|
2015-07-31 01:56:30 +02:00
|
|
|
|
|
|
|
ifdef LOCAL_SDK_VERSION
|
|
|
|
$(error $(LOCAL_PATH): $(LOCAL_MODULE): NDK fuzz tests are not supported.)
|
|
|
|
endif
|
|
|
|
|
2017-08-21 23:07:42 +02:00
|
|
|
LOCAL_CFLAGS += -fsanitize-coverage=trace-pc-guard,indirect-calls,trace-cmp
|
2017-04-19 19:56:45 +02:00
|
|
|
LOCAL_STATIC_LIBRARIES += libFuzzer
|
2015-07-31 01:56:30 +02:00
|
|
|
|
|
|
|
ifdef LOCAL_MODULE_PATH
|
|
|
|
$(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH when building test $(LOCAL_MODULE))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef LOCAL_MODULE_PATH_32
|
|
|
|
$(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH_32 when building test $(LOCAL_MODULE))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef LOCAL_MODULE_PATH_64
|
|
|
|
$(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH_64 when building test $(LOCAL_MODULE))
|
|
|
|
endif
|
|
|
|
|
2016-09-02 22:25:59 +02:00
|
|
|
LOCAL_MODULE_PATH_64 := $(TARGET_OUT_DATA_NATIVE_TESTS)/fuzzers/$(LOCAL_MODULE)
|
|
|
|
LOCAL_MODULE_PATH_32 := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS)/fuzzers/$(LOCAL_MODULE)
|
2015-07-31 01:56:30 +02:00
|
|
|
|
|
|
|
ifndef LOCAL_MULTILIB
|
|
|
|
ifndef LOCAL_32_BIT_ONLY
|
|
|
|
LOCAL_MULTILIB := both
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
include $(BUILD_EXECUTABLE)
|