[libclc] [libclc] Set OpenCL C version for each target (PR #135733)
Fraser Cormack via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 16 01:21:32 PDT 2025
================
@@ -387,21 +387,39 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
message( STATUS " device: ${d} ( ${${d}_aliases} )" )
- if ( ARCH STREQUAL spirv OR ARCH STREQUAL spirv64 )
+ # 1.2 is Clang's default OpenCL C language standard to compile for.
+ set( opencl_lang_std "CL1.2" )
+
+ if ( ${DARCH} STREQUAL spirv )
----------------
frasercrmck wrote:
I'd prefer `if( DARCH STREQUAL spirv )` which better fits the current style.
https://github.com/llvm/llvm-project/pull/135733
More information about the cfe-commits
mailing list