[libc-commits] [clang] [libc] [Clang] Gut the libc wrapper headers and simplify (PR #168438)

Nick Sarnie via libc-commits libc-commits at lists.llvm.org
Mon Nov 17 13:55:13 PST 2025


sarnex wrote:

Not sure if I totally understand the question but if it's just how do we declare SYCL device functions basically it just comes down to slapping an attribute on the decl, I believe our plan for the upstream frontend is for it to be `[[clang::sycl_external]]`
If the code shouldn't be compiled on the host also it can be wrapped in a `__SYCL_DEVICE_ONLY__` guard.

So if we want to compile externally callable device-only code for SYCL it would be something like
```
#ifdef __SYCL_DEVICE_ONLY__
[[clang::sycl_external]] void Foo();
#endif
```



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


More information about the libc-commits mailing list