[PATCH] D51561: [CMake] Add support for unittests that have input files

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 5 18:16:11 PDT 2018


I think LLVMTestingSupport should never be a shared lib, what do you think?

I can’t fix this until tomorrow but if you need an immediate workaround you
can pass TestMainArgv0 to the function instead. Could you please check that
in for me?
On Wed, Sep 5, 2018 at 5:56 PM Fangrui Song via Phabricator <
reviews at reviews.llvm.org> wrote:

> MaskRay added a comment.
>
> For `-DBUILD_SHARED_LIBS=on` users,
>
>   % ninja libLLVMTestingSupport.so
>   ............. -Wl,-z,defs  ..........
>   ld.lld: error: undefined symbol: TestMainArgv0
>   >>> referenced by SupportHelpers.cpp
>   >>>
>  lib/Testing/Support/CMakeFiles/LLVMTestingSupport.dir/SupportHelpers.cpp.o:(llvm::unittest::getInputFileDirectory())
>   clang-8: error: linker command failed with exit code 1 (use -v to see
> invocation)
>   ninja: build stopped: subcommand failed.
>
> Now libLLVMTestingSupport.so references a symbol in
> `utils/unittest/UnitTestMain/TestMain.cpp`
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D51561
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180905/99046713/attachment.html>


More information about the llvm-commits mailing list