Index: llvm/trunk/lib/Fuzzer/test/CMakeLists.txt =================================================================== --- llvm/trunk/lib/Fuzzer/test/CMakeLists.txt +++ llvm/trunk/lib/Fuzzer/test/CMakeLists.txt @@ -195,10 +195,20 @@ set_target_properties(LLVMFuzzer-DSOTest PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/Fuzzer/test") -set_target_properties(LLVMFuzzer-DSO1 PROPERTIES LIBRARY_OUTPUT_DIRECTORY - "${CMAKE_BINARY_DIR}/lib/Fuzzer/lib") -set_target_properties(LLVMFuzzer-DSO2 PROPERTIES LIBRARY_OUTPUT_DIRECTORY - "${CMAKE_BINARY_DIR}/lib/Fuzzer/lib") + +if(MSVC) + set_output_directory(LLVMFuzzer-DSO1 + BINARY_DIR "${CMAKE_BINARY_DIR}/lib/Fuzzer/test" + LIBRARY_DIR "${CMAKE_BINARY_DIR}/lib/Fuzzer/test") + set_output_directory(LLVMFuzzer-DSO2 + BINARY_DIR "${CMAKE_BINARY_DIR}/lib/Fuzzer/test" + LIBRARY_DIR "${CMAKE_BINARY_DIR}/lib/Fuzzer/test") +else(MSVC) + set_output_directory(LLVMFuzzer-DSO1 + LIBRARY_DIR "${CMAKE_BINARY_DIR}/lib/Fuzzer/lib") + set_output_directory(LLVMFuzzer-DSO2 + LIBRARY_DIR "${CMAKE_BINARY_DIR}/lib/Fuzzer/lib") +endif() set(TestBinaries ${TestBinaries} LLVMFuzzer-DSOTest) Index: llvm/trunk/lib/Fuzzer/test/DSO1.cpp =================================================================== --- llvm/trunk/lib/Fuzzer/test/DSO1.cpp +++ llvm/trunk/lib/Fuzzer/test/DSO1.cpp @@ -2,7 +2,9 @@ // License. See LICENSE.TXT for details. // Source code for a simple DSO. - +#ifdef _WIN32 +__declspec( dllexport ) +#endif int DSO1(int a) { if (a < 123456) return 0; Index: llvm/trunk/lib/Fuzzer/test/DSO2.cpp =================================================================== --- llvm/trunk/lib/Fuzzer/test/DSO2.cpp +++ llvm/trunk/lib/Fuzzer/test/DSO2.cpp @@ -2,7 +2,9 @@ // License. See LICENSE.TXT for details. // Source code for a simple DSO. - +#ifdef _WIN32 +__declspec( dllexport ) +#endif int DSO2(int a) { if (a < 3598235) return 0;