Skip to content

Commit 8292e05

Browse files
authored
[libclc] Build for OpenCL 3.0 (#135733)
This PR is modified cherry-pick of intel/llvm@cba338e5fb1c This PR sets OpenCL language version to be the same, which is 3.0, for every target and device, in order to unify the build process. Target should define supported extensions and features via setSupportedOpenCLOpts API. llvm-diff shows one change to amdgcn--amdhsa.bc: * ctz symbols are added since they are now enabled for amdgcn.
1 parent 14b38cf commit 8292e05

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libclc/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,9 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
411411
set( LIBCLC_ARCH_OBJFILE_DIR "${LIBCLC_OBJFILE_DIR}/${arch_suffix}" )
412412
file( MAKE_DIRECTORY ${LIBCLC_ARCH_OBJFILE_DIR} )
413413

414+
# Build for OpenCL 3.0 independently of the target or device.
415+
list( APPEND build_flags -cl-std=CL3.0 )
416+
414417
string( TOUPPER "CLC_${MACRO_ARCH}" CLC_TARGET_DEFINE )
415418

416419
list( APPEND build_flags

0 commit comments

Comments
 (0)