LNK1149 output filename matches input filename
This is an error I get from the linker only when I enable on MSVC:
/fsanitize=fuzzer
The problem can be recreated by trying to use CMake to build .
At the top of the first/main CMakeLists if you put:
cmake_minimum_required(VERSION 3.10)
project(quickjs LANGUAGES C)
#ADD THE BELOW
add_compile_options(
$<$<CONFIG:DEBUG>:/fsanitize=fuzzer>
)
And build in Debug mode it no longer compiles but gives the error message:
LNK1149 output filename matches input filename
Then if I change in the CMakeLists at line 282:
set_target_properties(qjs_exe PROPERTIES
OUTPUT_NAME "qjs"
)
to:
set_target_properties(qjs_exe PROPERTIES
OUTPUT_NAME "qjs_output_name"
)
It then builds again, even with the /fsanitize=fuzzer on. Is this a bug in MSVC?
Clearly there's a naming conflict, but only when /fsanitize=fuzzer is on.
However this error I've gotten before, what does "output filename matches input filename" mean?