OSDN Git Service

[libFuzzer] Export external functions on tests.
authorMarcos Pividori <mpividori@google.com>
Fri, 10 Feb 2017 01:40:28 +0000 (01:40 +0000)
committerMarcos Pividori <mpividori@google.com>
Fri, 10 Feb 2017 01:40:28 +0000 (01:40 +0000)
commit671eb85b7219a1a3e6f1e1c646886e9351f5ea58
tree5f94f51911b7339134fa7b26d75e1d4355e282af
parentd9191ae5c695bfb648b6bba36e028b766369eb7f
[libFuzzer] Export external functions on tests.

We need to export external functions so they are found when calling
GetProcAddress() on Windows. But we can't use `__declspec(dllexport)` because
we want the targets to be completely independent from the fuzz engines and don't
depend on other header files. Also, we don't want to include platform specific
code managed with conditional macros.
So, the solution is to add the exported symbols with linker flags in cmake.

Differential revision: https://reviews.llvm.org/D29752

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294688 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Fuzzer/test/CMakeLists.txt