From d6524c8dfa37634257050ca71d16e117b802181c Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Thu, 30 Jan 2025 13:29:10 +1100 Subject: Reapply "[ORC] Enable JIT support for the compact-unwind frame..." with fixes. This reapplies 4f0325873fa (and follow up patches 26fc07d5d88, a001cc0e6cdc, c9bc242e387, and fd174f0ff3e), which were reverted in 212cdc9a377 to investigate bot failures (e.g. https://lab.llvm.org/buildbot/#/builders/108/builds/8502) The fix to address the bot failures was landed in d0052ebbe2e. This patch also restricts construction of the UnwindInfoManager object to Apple platforms (as it won't be used on other platforms). --- llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp') diff --git a/llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp b/llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp index aa79968..b51fa24b 100644 --- a/llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp +++ b/llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp @@ -45,6 +45,7 @@ SelfExecutorProcessControl::SelfExecutorProcessControl( this->DylibMgr = this; this->JDI = {ExecutorAddr::fromPtr(jitDispatchViaWrapperFunctionManager), ExecutorAddr::fromPtr(this)}; + if (this->TargetTriple.isOSBinFormatMachO()) GlobalManglingPrefix = '_'; @@ -52,6 +53,12 @@ SelfExecutorProcessControl::SelfExecutorProcessControl( ExecutorAddr::fromPtr(&llvm_orc_registerEHFrameSectionWrapper); this->BootstrapSymbols[rt::DeregisterEHFrameSectionWrapperName] = ExecutorAddr::fromPtr(&llvm_orc_deregisterEHFrameSectionWrapper); + +#ifdef __APPLE__ + this->UnwindInfoMgr = UnwindInfoManager::TryCreate(); + if (this->UnwindInfoMgr) + this->UnwindInfoMgr->addBootstrapSymbols(this->BootstrapSymbols); +#endif // __APPLE__ } Expected> -- cgit v1.1