[llvm] 0c5bcd1 - [lli] Fix -DBUILD_SHARED_LIBS=on build

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 22:41:44 PDT 2019


Author: Fangrui Song
Date: 2019-10-29T22:41:35-07:00
New Revision: 0c5bcd1b59828cd09c1a105e077bd6e8aff9ac51

URL: https://github.com/llvm/llvm-project/commit/0c5bcd1b59828cd09c1a105e077bd6e8aff9ac51
DIFF: https://github.com/llvm/llvm-project/commit/0c5bcd1b59828cd09c1a105e077bd6e8aff9ac51.diff

LOG: [lli] Fix -DBUILD_SHARED_LIBS=on build

This fixes:

  ld.lld: error: undefined symbol: vtable for llvm::orc::rpc::ResponseAbandoned
  >>> referenced by lli.cpp

In -DBUILD_SHARED_LIBS=on builds, all directly referenced references must
be linked to appease -Wl,-z,defs.

Added: 
    

Modified: 
    llvm/tools/lli/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/tools/lli/CMakeLists.txt b/llvm/tools/lli/CMakeLists.txt
index 476c09229e63..db163ad131e8 100644
--- a/llvm/tools/lli/CMakeLists.txt
+++ b/llvm/tools/lli/CMakeLists.txt
@@ -11,6 +11,7 @@ set(LLVM_LINK_COMPONENTS
   MC
   MCJIT
   Object
+  OrcError
   OrcJIT
   Passes
   RuntimeDyld


        


More information about the llvm-commits mailing list