[ORC] Add ELFNixPlatform::Create overload -- Pass ORC runtime as def generator.
authorLang Hames <lhames@gmail.com>
Wed, 15 Feb 2023 03:13:41 +0000 (19:13 -0800)
committerLang Hames <lhames@gmail.com>
Wed, 15 Feb 2023 03:19:35 +0000 (19:19 -0800)
commitef6d474aa7ac3584524298b43432450c54d39636
tree25213e80704b4163674811c728b294bb422f2024
parentf708a549b87e163e144b41fe1887951c5639027d
[ORC] Add ELFNixPlatform::Create overload -- Pass ORC runtime as def generator.

The existing Create method took a path to the ORC runtime and created a
StaticLibraryDefinitionGenerator for it. The new overload takes a
std::unique_ptr<DefinitionGenerator> directly instead. This provides more
flexibility when constructing MachOPlatforms. E.g. The runtime archive can be
embedded in a special section in the ORC controller executable or library,
rather than being on-disk.

This is the ELFNixPlatform equivalent of the MachOPlatform change in
be2fc577c38.
llvm/include/llvm/ExecutionEngine/Orc/ELFNixPlatform.h
llvm/lib/ExecutionEngine/Orc/ELFNixPlatform.cpp