Index: lib/Fuzzer/test/CMakeLists.txt =================================================================== --- lib/Fuzzer/test/CMakeLists.txt +++ lib/Fuzzer/test/CMakeLists.txt @@ -142,6 +142,17 @@ add_libfuzzer_test(${Test} SOURCES ${Test}.cpp) endforeach() +if(MSVC) + function(test_export_symbol target symbol) + set_target_properties(LLVMFuzzer-${target} PROPERTIES LINK_FLAGS + "-export:${symbol}") + endfunction() + test_export_symbol(InitializeTest "LLVMFuzzerInitialize") + test_export_symbol(BogusInitializeTest "LLVMFuzzerInitialize") + test_export_symbol(CustomCrossOverTest "LLVMFuzzerCustomCrossOver") + test_export_symbol(CustomMutatorTest "LLVMFuzzerCustomMutator") +endif() + ############################################################################### # Unit tests ###############################################################################