[llvm] ca04d74 - [ORC] DLLImportDefinitionGenerator should use LookupKind::Static.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 23 18:51:39 PDT 2025
Author: Lang Hames
Date: 2025-06-24T11:51:32+10:00
New Revision: ca04d74564d7dcf1d462f9746ffebde30c45db5e
URL: https://github.com/llvm/llvm-project/commit/ca04d74564d7dcf1d462f9746ffebde30c45db5e
DIFF: https://github.com/llvm/llvm-project/commit/ca04d74564d7dcf1d462f9746ffebde30c45db5e.diff
LOG: [ORC] DLLImportDefinitionGenerator should use LookupKind::Static.
LookupKind::DLSym should only be used for lookups issued on behalf of the ORC
runtime's emulated dlsym operation.
This should fix a bug where ORC runtime clients are unable to access functions
exported by the runtime.
https://github.com/llvm/llvm-project/issues/145296
Added:
Modified:
llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
index 47764ceffed86..6794e7621f0ca 100644
--- a/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
@@ -540,8 +540,8 @@ Error DLLImportDefinitionGenerator::tryToGenerate(
for (auto &KV : ToLookUpSymbols)
LookupSet.add(ES.intern(KV.first), KV.second);
- auto Resolved =
- ES.lookup(LinkOrder, LookupSet, LookupKind::DLSym, SymbolState::Resolved);
+ auto Resolved = ES.lookup(LinkOrder, LookupSet, LookupKind::Static,
+ SymbolState::Resolved);
if (!Resolved)
return Resolved.takeError();
More information about the llvm-commits
mailing list