Skip to content

Commit d74fef9

Browse files
committed
[SR-14813] Add Swift compile options for fuzzing.
We only had the C/C++/ObjC/ObjC++ option. Add the Swift one too.
1 parent a6ec498 commit d74fef9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,9 @@ function(add_swift_fuzzer_host_tool executable)
885885
886886
# Then make sure that we pass the -fsanitize=fuzzer flag both on the cflags
887887
# and cxx flags line.
888-
target_compile_options(${executable} PRIVATE $<$<COMPILE_LANGUAGE:C,CXX,OBJC,OBJCXX>:-fsanitize=fuzzer>)
888+
target_compile_options(${executable} PRIVATE
889+
$<$<COMPILE_LANGUAGE:C,CXX,OBJC,OBJCXX>:-fsanitize=fuzzer>
890+
$<$<COMPILE_LANGUAGE:Swift>:-sanitize=fuzzer>)
889891
target_link_libraries(${executable} PRIVATE "-fsanitize=fuzzer")
890892
endfunction()
891893

0 commit comments

Comments
 (0)