[PATCH] D51745: Add libgtest_main as a dependency of libLLVMTestingSupport

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 6 12:37:55 PDT 2018


I think we can also get around this by just passing the arg as a parameter.
Alternatively, this library is trivially small, we could force it to be
statically linked
On Thu, Sep 6, 2018 at 11:38 AM Derek Schuff via Phabricator <
reviews at reviews.llvm.org> wrote:

> dschuff created this revision.
> dschuff added a reviewer: zturner.
> Herald added subscribers: aheejin, mgorny.
>
> r341502 added an extern declaration of TestMainArgv0 in
> testing/Support/SupportHelpers.cpp; It is defined in libgtest_main,
> so add that as an explicit dependency of LLVMTestingSupport.
> This fixes the BUILD_SHARED_LIBS build of LLVM.
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D51745
>
> Files:
>   lib/Testing/Support/CMakeLists.txt
>
>
> Index: lib/Testing/Support/CMakeLists.txt
> ===================================================================
> --- lib/Testing/Support/CMakeLists.txt
> +++ lib/Testing/Support/CMakeLists.txt
> @@ -16,4 +16,4 @@
>
>
>  include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
>
>  include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googlemock/include)
> -target_link_libraries(LLVMTestingSupport PRIVATE gtest)
> +target_link_libraries(LLVMTestingSupport PRIVATE gtest gtest_main)
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180906/b3fa7c3a/attachment.html>


More information about the llvm-commits mailing list