Files
clang-p2996/llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
Lang Hames 4299d8d0ce [ORC] Add MaterializationUnit::Interface parameter to ObjectLayer::add.
Also moves object interface building functions out of Mangling.h and in to the
new ObjectFileInterfaces.h header, and updates the llvm-jitlink tool to use
custom object interfaces rather than a custom link layer.

ObjectLayer::add overloads are added to match the old signatures (which
do not take a MaterializationUnit::Interface). These overloads use the
standard getObjectFileInterface function to build an interface.

Passing a MaterializationUnit::Interface explicitly makes it easier to alter
the effective interface of the object file being added, e.g. by changing symbol
visibility/linkage, or renaming symbols (in both cases the changes will need to
be mirrored by a JITLink pass at link time to update the LinkGraph to match the
explicit interface). Altering interfaces in this way can be useful when lazily
compiling (e.g. for renaming function bodies) or emulating linker options (e.g.
demoting all symbols to hidden visibility to emulate -load_hidden).
2021-12-15 12:03:55 +11:00

74 lines
1.4 KiB
CMake

add_llvm_component_library(LLVMOrcJIT
CompileOnDemandLayer.cpp
CompileUtils.cpp
Core.cpp
DebugObjectManagerPlugin.cpp
DebuggerSupportPlugin.cpp
DebugUtils.cpp
EPCDynamicLibrarySearchGenerator.cpp
EPCDebugObjectRegistrar.cpp
EPCEHFrameRegistrar.cpp
EPCGenericDylibManager.cpp
EPCGenericJITLinkMemoryManager.cpp
EPCGenericRTDyldMemoryManager.cpp
EPCIndirectionUtils.cpp
ExecutionUtils.cpp
ObjectFileInterface.cpp
IndirectionUtils.cpp
IRCompileLayer.cpp
IRTransformLayer.cpp
JITTargetMachineBuilder.cpp
LazyReexports.cpp
Layer.cpp
LookupAndRecordAddrs.cpp
LLJIT.cpp
MachOPlatform.cpp
ELFNixPlatform.cpp
Mangling.cpp
ObjectLinkingLayer.cpp
ObjectTransformLayer.cpp
OrcABISupport.cpp
OrcV2CBindings.cpp
RTDyldObjectLinkingLayer.cpp
SimpleRemoteEPC.cpp
Speculation.cpp
SpeculateAnalyses.cpp
ExecutorProcessControl.cpp
TaskDispatch.cpp
ThreadSafeModule.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/ExecutionEngine/Orc
DEPENDS
intrinsics_gen
LINK_LIBS
${LLVM_PTHREAD_LIB}
LINK_COMPONENTS
Core
ExecutionEngine
JITLink
Object
OrcShared
OrcTargetProcess
MC
MCDisassembler
Passes
RuntimeDyld
Support
Target
TransformUtils
)
add_subdirectory(Shared)
add_subdirectory(TargetProcess)
target_link_libraries(LLVMOrcJIT
PRIVATE
LLVMAnalysis
LLVMBitReader
LLVMBitWriter
LLVMPasses
)