[all-commits] [llvm/llvm-project] add76d: [X86] Fix -DBUILD_SHARED_LIBS=on builds after D695...

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Nov 1 09:51:36 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: add76dd3cbebc92f1862705d4432ba0f65db6286
      https://github.com/llvm/llvm-project/commit/add76dd3cbebc92f1862705d4432ba0f65db6286
  Author: Fangrui Song <maskray at google.com>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M llvm/unittests/Target/X86/CMakeLists.txt

  Log Message:
  -----------
  [X86] Fix -DBUILD_SHARED_LIBS=on builds after D69568/llvmorg-10-init-8877-g3a399c09878

In -DBUILD_SHARED_LIBS=on builds, a component must specify its direct dependencies to satisfy -Wl,-z,defs (added by llvm/modules/HandleLLVMOptions.cmake).

Core is a direct dependency via transitive header inclusion:

  ld.lld: error: undefined symbol: llvm::LLVMContext::LLVMContext()
  >>> referenced by MachineSizeOptsTest.cpp
  >>>               unittests/Target/X86/CMakeFiles/X86Tests.dir/MachineSizeOptsTest.cpp.o:(testing::internal::TestFactoryImpl<(anonymous namespace)::MachineSizeOptsTest_Test_Test>::CreateTest())

MC is a direct dependency via transitive header inclusion:

  ld.lld: error: undefined symbol: llvm::MCTargetOptions::MCTargetOptions()
  >>> referenced by MachineSizeOptsTest.cpp
  >>>               unittests/Target/X86/CMakeFiles/X86Tests.dir/MachineSizeOptsTest.cpp.o:((anonymous namespace)::MachineSizeOptsTest::SetUp())




More information about the All-commits mailing list