Add back the ability to build standalone LibFuzzer.
Details
Diff Detail
- Repository
- rCRT Compiler Runtime
Event Timeline
@kcc
Fuzzer can be built in the same tree with other sanitizer runtimes.
Why do you need a standalone build?
For Android's toolchain, this library has to be built multiple times. Once is for the platform developers to use (i.e. the latest API level). At least one more build has to be done using API 14 (our lowest native supported API level, but this is 21 for 64-bit) for NDK users. We then package both libFuzzer.a libraries, and allow the build to select the correct one (platform or NDK/app user).
Do you need an LLVM cmake rule for that?
The build rule is and will remain extremely simple, see lib/fuzzer/build.sh
Can you just use that?
For sanitizers, we build only for api 14 and use that binary everywhere. Why is libfuzzer special?
One option is to configure the whole compiler-rt build tree, and then do "ninja fuzzer" w/o building the rest of the libraries.
libfuzzer depends on the C++ stl. This makes a common libfuzzer.a infeasible because the STL namespace gets specialized when built against the NDK and causes a link failure when such an archive is built against the platform.
One option is to configure the whole compiler-rt build tree, and then do "ninja fuzzer" w/o building the rest of the libraries.
I believe Yi encounted an error during CMake configuration itself, but he can clarify.