[libclc] [libclc] Set OpenCL C version for each target (PR #135733)
Wenju He via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 16 18:58:12 PDT 2025
wenju-he wrote:
> Yes I think on reflection it's probably okay to compile for the highest supported OpenCL C version.
Yeah I think libclc should compile for the version that target claims supporting.
> I believe they're supersets of one another, so a 3.0 builtins library would still contain all of the 1.2 builtins? I might be missing some of the nitty gritty here though.
3.0 is backward compatible with 1.2,1.1,1.0.
For other versions, it depends on whether target include the versions in [CL_DEVICE_OPENCL_C_ALL_VERSIONS](https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_API.html#CL_DEVICE_OPENCL_C_ALL_VERSIONS) query.
https://github.com/llvm/llvm-project/pull/135733
More information about the cfe-commits
mailing list