clang: error: unsupported option '-fsanitize=fuzzer' for target 'x86_64-w64-windows-gnu'
Youpen-y opened this issue · 2 comments
Youpen-y commented
I use clang from MSYS2 on Windows.
version infromation:
>> clang -v
(built by Brecht Sanders) clang version 14.0.0
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: `E:/MSYS2/mingw64/bin`
error1:
>> clang -g -fsanitize=fuzzer Fuzzing_get_first_cap.c
clang: error: unsupported option '-fsanitize=fuzzer' for target 'x86_64-w64-windows-gnu'
error2:
>> clang -g -fsanitize=address Fuzzing_get_first_cap.c
E:/MSYS2/mingw64/bin/ld: cannot find E:/MSYS2/mingw64/lib/clang/14.0.0/lib/windows/libclang_rt.asan_dynamic-x86_64.dll.a: No such file or directory
E:/MSYS2/mingw64/bin/ld: cannot find E:/MSYS2/mingw64/lib/clang/14.0.0/lib/windows/libclang_rt.asan_dynamic_runtime_thunk-x86_64.a: No such file or directory
E:/MSYS2/mingw64/bin/ld: cannot find E:/MSYS2/mingw64/lib/clang/14.0.0/lib/windows/libclang_rt.asan_dynamic_runtime_thunk-x86_64.a: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It looks like this version hasn't support this option any more, is that true? If it isn't, how can I fix it?
And the second error shows that can't support AddressSanitizer, is that due to lack of some dependencies?
syx1747 commented
can you show us how solve this problem
Youpen-y commented
Embrace the Linux environment or try WSL.