[PATCH] D29752: [libFuzzer] Export external functions.

Marcos Pividori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 17:51:54 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL294688: [libFuzzer] Export external functions on tests. (authored by mpividori).

Changed prior to commit:
  https://reviews.llvm.org/D29752?vs=87913&id=87929#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D29752

Files:
  llvm/trunk/lib/Fuzzer/test/CMakeLists.txt


Index: llvm/trunk/lib/Fuzzer/test/CMakeLists.txt
===================================================================
--- llvm/trunk/lib/Fuzzer/test/CMakeLists.txt
+++ llvm/trunk/lib/Fuzzer/test/CMakeLists.txt
@@ -142,6 +142,18 @@
   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
 ###############################################################################


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29752.87929.patch
Type: text/x-patch
Size: 916 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170210/011b2469/attachment.bin>


More information about the llvm-commits mailing list