File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
if (BUILD_FUZZERS AND NOT USE_STANDALONE_FUZZERS )
4
4
set (CMAKE_REQUIRED_FLAGS "-fsanitize=fuzzer-no-link" )
5
- add_c_flag (-fsanitize=fuzzer )
6
5
add_c_flag (-fsanitize=fuzzer-no-link )
7
6
unset (CMAKE_REQUIRED_FLAGS )
8
7
endif ()
@@ -24,6 +23,9 @@ foreach(fuzz_target_src ${SRC_FUZZERS})
24
23
target_include_directories (${fuzz_target_name} SYSTEM PRIVATE ${LIBGIT2_SYSTEM_INCLUDES} )
25
24
26
25
target_link_libraries (${fuzz_target_name} ${LIBGIT2_SYSTEM_LIBS} )
26
+ if (NOT USE_STANDALONE_FUZZERS )
27
+ target_link_options (${fuzz_target_name} PRIVATE "-fsanitize=fuzzer" )
28
+ endif ()
27
29
28
30
add_test (${fuzz_target_name} "${CMAKE_CURRENT_BINARY_DIR} /${fuzz_target_name} " "${CMAKE_CURRENT_SOURCE_DIR} /corpora/${fuzz_name} " )
29
31
endforeach ()
You can’t perform that action at this time.
0 commit comments