Open
Description
I built an iOS app demo on my Mac using Xcode and now I want to fuzz it with LibFuzzer. After reading the LibFuzzer documentation, I found that it has a feature to use LibFuzzer as a library. However, when I modified my code and tried to link libclang_rt.fuzzer_no_main_osx.a
, I encountered an error:
In /usr/local/Cellar/llvm/16.0.6/lib/clang/16/lib/darwin/libclang_rt.fuzzer_no_main_osx.a(FuzzerCrossOver.cpp.o),
building for iOS Simulator, but linking in object file built for macOS,
file '/usr/local/Cellar/llvm/16.0.6/lib/clang/16/lib/darwin/libclang_rt.fuzzer_no_main_osx.a' for architecture x86_64
From my understanding, I need to specify the target architecture as iossim when compiling compiler-rt to obtain the corresponding library: libclang_rt.fuzzer_no_main_iossim.a
.
I'm not sure about the specific terminal command for this( New to this area. T^T). I'm hoping to get some help here.