[flang-commits] [flang] [llvm] [flang-rt] Remove library dependency from flang-rt to offload (PR #198793)

Joseph Huber via flang-commits flang-commits at lists.llvm.org
Mon Jun 1 14:58:40 PDT 2026


jhuber6 wrote:

> @jhuber6 The patch causes the undefined symbol error on MacOS.
> 
> ```
> Undefined symbols for architecture arm64:
>   "___tgt_register_rpc_callback", referenced from:
>       Fortran::runtime::io::RegisterRPCHandlers() in io-api-server.cpp.o
>       Fortran::runtime::io::RegisterRPCHandlers() in io-api-server.cpp.o
> ld: symbol(s) not found for architecture arm64
> ```
> 
> cc @luporl

Honestly, we don't even support offloading on MacOS, but I would've expected this to work. Could you share what you get for `clang --print-target-triple`? Means that this is not working for some reason.
```c
#elif defined(__APPLE__)
extern "C" void __tgt_register_rpc_callback(RPCCallbackTy)
    __attribute__((weak_import));
#else
```

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


More information about the flang-commits mailing list