[PATCH] D27870: [libFuzzer] Diff 25 - Fix test with shared libraries on Windows.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 17:02:50 PST 2016


Can you add a -L to the link line so that it looks in
<CMAKE_BINARY_DIR>/bin?

On Fri, Dec 16, 2016 at 5:00 PM Marcos Pividori via Phabricator <
reviews at reviews.llvm.org> wrote:

> mpividori added inline comments.
>
>
> ================
> Comment at: lib/Fuzzer/test/CMakeLists.txt:218
>    "${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)
> +  # Import libraries will be created in the bin directory.
> ----------------
> zturner wrote:
> > kcc wrote:
> > > That's bad. Please try to find a way to avoid this.
> > I'm not sure I follow the logic here.  Without this patch, where do the
> .lib and .dll file end up, and is the problem occuring during link time or
> runtime?
> I tried to find a better solution, but didn't succeed.
> Without this patch, the .lib ends in: "<CMAKE_BINARY_DIR>/bin" (because
> the .dll is created there with the rule: CMAKE_CXX_CREATE_SHARED_LIBRARY).
> But cmake tries to find it in: "<CMAKE_BINARY_DIR>/lib"
> So the problem is at link time.
>
> With this patch, I let cmake knows that the .lib file is in
> "<CMAKE_BINARY_DIR>/bin".
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D27870
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161217/a9a3e698/attachment.html>


More information about the llvm-commits mailing list