Skip to content

Commit ca04d74

Browse files
committed
[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. #145296
1 parent 88b98d3 commit ca04d74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,8 @@ Error DLLImportDefinitionGenerator::tryToGenerate(
540540
for (auto &KV : ToLookUpSymbols)
541541
LookupSet.add(ES.intern(KV.first), KV.second);
542542

543-
auto Resolved =
544-
ES.lookup(LinkOrder, LookupSet, LookupKind::DLSym, SymbolState::Resolved);
543+
auto Resolved = ES.lookup(LinkOrder, LookupSet, LookupKind::Static,
544+
SymbolState::Resolved);
545545
if (!Resolved)
546546
return Resolved.takeError();
547547

0 commit comments

Comments
 (0)