I noticed there were several __has_feature tests for the rest of the sanitizers, but none for the fuzzer. Is that an intentional omission, or would it be a useful addition? If the latter, I’d be happy to upstream this WIP patch to add it [1].

I’m imagining it would be very useful in order to simplify build systems, among other things:

#if __has_feature(fuzzer)
int LLVMFuzzerTestOneInput(const uint8_t D, size_t S) {/…*/}
int main() { fprintf(stderr, “error: not built with fuzzer support\n”); return -1; }



1: https://gist.github.com/jroelofs/588c49d2d3c8510abaa9a1e29a1aaba4