[clang] [clang][SYCL] Emit non-exported device symbols with internal/linkonce_odr linkage (PR #215437)

Yury Plyakhin via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 08:50:15 PDT 2026


YuriPlyakhin wrote:

> Hacking in `linkonce_odr` has been common in GPU code, and I really wish we could do away with it entirely. Deciding if a definition can be discarded or not belongs in the linker, and I thought we were already doing LTO / IR linking for SYCL, so why is it necessary here? What's stopping us from doing symbol resolution in the sycl-linker if we don't already? I already do this in the nvlink wrapper.

Agreed, this belongs in the linker, and I'd like to get there. The blocker is that SYCL isn't on the LTO path yet, we IR-link via `linkInModule` in `clang-sycl-linker`.
Enabling LTO for SYCL is next on my list, after no-rdc support, and once symbol resolution happens there, I'd be glad to drop this.

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


More information about the cfe-commits mailing list