Skip to content

Commit 3661520

Browse files
lhameststellar
authored andcommitted
[ORC][LLI] Remove redundant eh-frame registration plugin construction from lli.
As of d0052eb the setUpGenericLLVMIRPlatform function will automatically add an instance of the EHFrameRegistrationPlugin (for LLJIT instances whose object linking layers are ObjectLinkingLayers, not RTDyldObjectLinkingLayers). This commit removes the redundant plugin creation in the object linking layer constructor function in lli.cpp to prevent duplicate registration of eh-frames, which is likely the cause of recent bot failures, e.g. https://lab.llvm.org/buildbot/#/builders/108/builds/8685. (cherry picked from commit 9052b37)
1 parent 95354f3 commit 3661520

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

llvm/tools/lli/lli.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727
#include "llvm/ExecutionEngine/Orc/AbsoluteSymbols.h"
2828
#include "llvm/ExecutionEngine/Orc/DebugUtils.h"
2929
#include "llvm/ExecutionEngine/Orc/Debugging/DebuggerSupport.h"
30-
#include "llvm/ExecutionEngine/Orc/EHFrameRegistrationPlugin.h"
3130
#include "llvm/ExecutionEngine/Orc/EPCDynamicLibrarySearchGenerator.h"
32-
#include "llvm/ExecutionEngine/Orc/EPCEHFrameRegistrar.h"
3331
#include "llvm/ExecutionEngine/Orc/EPCGenericRTDyldMemoryManager.h"
3432
#include "llvm/ExecutionEngine/Orc/ExecutionUtils.h"
3533
#include "llvm/ExecutionEngine/Orc/IRPartitionLayer.h"
@@ -1033,14 +1031,10 @@ int runOrcJIT(const char *ProgName) {
10331031
Builder.getJITTargetMachineBuilder()
10341032
->setRelocationModel(Reloc::PIC_)
10351033
.setCodeModel(CodeModel::Small);
1036-
Builder.setObjectLinkingLayerCreator([&P](orc::ExecutionSession &ES,
1037-
const Triple &TT) {
1038-
auto L = std::make_unique(ES);
1039-
if (P != LLJITPlatform::ExecutorNative)
1040-
L->addPlugin(std::make_unique(
1041-
ES, ExitOnErr(orc::EPCEHFrameRegistrar::Create(ES))));
1042-
return L;
1043-
});
1034+
Builder.setObjectLinkingLayerCreator(
1035+
[&](orc::ExecutionSession &ES, const Triple &TT) {
1036+
return std::make_unique(ES);
1037+
});
10441038
}
10451039

10461040
auto J = ExitOnErr(Builder.create());

0 commit comments

Comments
 (0)