1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/lib/ExecutionEngine
Michal Gorny 46ea9f7a7d [cmake] Expose the dependencies of ExecutionEngine as PUBLIC
Expose the dependencies of LLVMExecutionEngine library as PUBLIC rather
than PRIVATE when building a shared library. This is necessary because
the library is not contained but exposes API of other LLVM libraries via
its headers.

This causes other libraries to fail to link if the linker verifies for
correctness of -l flags (i.e. fails on indirect dependencies). This e.g.
happens when building LLDB against shared LLVM:

  lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTIN4llvm18MCJITMemoryManagerE[_ZTIN4llvm18MCJITMemoryManagerE]+0x10): undefined reference to `typeinfo for llvm::RuntimeDyld::MemoryManager'
  lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTVN4llvm18MCJITMemoryManagerE[_ZTVN4llvm18MCJITMemoryManagerE]+0x60): undefined reference to `llvm::RuntimeDyld::MemoryManager::anchor()'
  lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE[_ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE]+0x48): undefined reference to `llvm::RTDyldMemoryManager::deregisterEHFrames()'
  lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE[_ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE]+0x60): undefined reference to `llvm::RuntimeDyld::MemoryManager::anchor()'
  lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE[_ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE]+0xd0): undefined reference to `llvm::JITSymbolResolver::anchor()'
  collect2: error: ld returned 1 exit status

Declaring the dependencies as PUBLIC guarantees that any package using
the ExecutionEngine library will also get explicit -l flags for
the dependent libraries guaranteeing that the symbols exposed in headers
could be resolved.

Patch originally written by NAKAMURA Takumi.

Differential Revision: https://reviews.llvm.org/D36211

llvm-svn: 310712
2017-08-11 13:25:20 +00:00
..
IntelJITEvents Remove some leftover DWARFContextInMemory. 2017-07-19 23:34:59 +00:00
Interpreter Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MCJIT [ORC] Errorize the ORC APIs. 2017-07-07 02:59:13 +00:00
OProfileJIT Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
Orc [ORC] Errorize the ORC APIs. 2017-07-07 02:59:13 +00:00
RuntimeDyld [RuntimeDyld][ORC] Add support for Thumb mode to RuntimeDyldMachOARM. 2017-08-09 20:19:27 +00:00
CMakeLists.txt [cmake] Expose the dependencies of ExecutionEngine as PUBLIC 2017-08-11 13:25:20 +00:00
ExecutionEngine.cpp Delete Default and JITDefault code models 2017-08-03 02:16:21 +00:00
ExecutionEngineBindings.cpp Delete Default and JITDefault code models 2017-08-03 02:16:21 +00:00
GDBRegistrationListener.cpp Do a sweep over move ctors and remove those that are identical to the default. 2016-10-20 12:20:28 +00:00
LLVMBuild.txt
SectionMemoryManager.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
TargetSelect.cpp Delete Default and JITDefault code models 2017-08-03 02:16:21 +00:00