[llvm] [flang-rt] Disable host-side offload support when offload is disabled (PR #207998)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 7 07:31:32 PDT 2026


jhuber6 wrote:

> So would it work for you if this used a new cmake flag with a different name which defaults to on?

I think it's easier solved with this, if it works. Alternatively, just mask it out entirely. The problem is that we don't split the concept of 'offloading' libraries, it's just the normal library.
```c
  #if defined(_MSC_VER)
  extern "C" void register_rpc_callback_stub(RPCCallbackTy) { }
  #pragma comment(linker, \
      "/alternatename:__tgt_register_rpc_callback=" \
      "register_rpc_callback_stub")
  #if defined(_M_ARM64EC)
  #pragma comment(linker, \
      "/alternatename:#__tgt_register_rpc_callback=" \
      "#register_rpc_callback_stub")
  #endif
  #endif
```

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


More information about the llvm-commits mailing list