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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 5 17:55:58 PDT 2018


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





More information about the llvm-commits mailing list