Hi,
There are two reasons why users might want to build libfuzzer:
- To fuzz LLVM itself
- To get the libFuzzer.a archive file, so that they can attach it to their code
Current CMake file only supports the first case: in order to build it, the user has to compile the entire LLVM repo with coverage flags (which is not even possible using e.g. default mac os clang).
The proposed change always builds libfuzzer, and supports the second use case if the specified flag is set.