[fuzz] Make libfuzzer defines backwards compatible for roll
This should fix the chrome roll.
Change-Id: I2de68f972996bf6124cf5cc27dfd538aa1161057
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316877
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
diff --git a/fuzz/oss_fuzz/FuzzTextBlobDeserialize.cpp b/fuzz/oss_fuzz/FuzzTextBlobDeserialize.cpp
index ba8f9be..3ace654 100644
--- a/fuzz/oss_fuzz/FuzzTextBlobDeserialize.cpp
+++ b/fuzz/oss_fuzz/FuzzTextBlobDeserialize.cpp
@@ -27,7 +27,8 @@
s->getCanvas()->drawTextBlob(tb, 200, 200, SkPaint());
}
-#if defined(SK_BUILD_FOR_LIBFUZZER)
+// TODO(kjlubick): remove IS_FUZZING... after https://crrev.com/c/2410304 lands
+#if defined(SK_BUILD_FOR_LIBFUZZER) || defined(IS_FUZZING_WITH_LIBFUZZER)
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (size > 1024) {
return 0;