[llvm] [Offload] Try loading dynamic libraries at global scope first (PR #227020)
Alex Duran via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 28 08:47:55 PDT 2026
================
@@ -138,7 +138,33 @@ static void *findZeFallback(std::string_view Name) {
return nullptr;
}
+// Returns true if every symbol was found, missing symbols are left null.
+static bool resolveSymbols(llvm::sys::DynamicLibrary &Lib) {
+ bool FoundAll = true;
+ for (size_t I = 0; I < dlwrap::size(); I++) {
+ const char *Sym = dlwrap::symbol(I);
+
+ void *P = Lib.getAddressOfSymbol(Sym);
+ if (P)
+ ODBG(OLDT_Init) << "Implementing " << Sym << " with dlsym(" << Sym
+ << ") -> " << P;
+ FoundAll &= P != nullptr;
----------------
adurang wrote:
I'm not sure this works for L0. The depending on the driver version some of the symbols can be NULL and be correct.
We might need to mark them to be able to make this check correctly... @blazej-smorawski any other idea for this?
https://github.com/llvm/llvm-project/pull/227020
More information about the llvm-commits
mailing list