[llvm] [offload] Add `dlwrap::loaded` function to check for optional symbols (PR #210737)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 03:11:00 PDT 2026


blazej-smorawski wrote:

I tested approach proposed by Joseph to use pragma for msvc, but it causes another problem - it's not that easy to tell if original symbol is used or not. It can be done by comparing the pointers of `func` and `func_stub` in a different translation unit, so the compiler will not fold it to false right away, but it also requires `/INCREMENTAL:NO` which seems quite bad to me.

Another solution could use `GetProcAddress`, but I think it's not worth doing right now. I will disable direct linking on windows for now if it's okay.

https://github.com/llvm/llvm-project/pull/210737


More information about the llvm-commits mailing list