summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Fuzzer/test/CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/test/CMakeLists.txt b/llvm/lib/Fuzzer/test/CMakeLists.txt
index cf9c99a36ca..890cbeef5e4 100644
--- a/llvm/lib/Fuzzer/test/CMakeLists.txt
+++ b/llvm/lib/Fuzzer/test/CMakeLists.txt
@@ -142,6 +142,18 @@ foreach(Test ${Tests})
add_libfuzzer_test(${Test} SOURCES ${Test}.cpp)
endforeach()
+function(test_export_symbol target symbol)
+ if(MSVC)
+ set_target_properties(LLVMFuzzer-${target} PROPERTIES LINK_FLAGS
+ "-export:${symbol}")
+ endif()
+endfunction()
+
+test_export_symbol(InitializeTest "LLVMFuzzerInitialize")
+test_export_symbol(BogusInitializeTest "LLVMFuzzerInitialize")
+test_export_symbol(CustomCrossOverTest "LLVMFuzzerCustomCrossOver")
+test_export_symbol(CustomMutatorTest "LLVMFuzzerCustomMutator")
+
###############################################################################
# Unit tests
###############################################################################
OpenPOWER on IntegriCloud