[libclc] Build for OpenCL 3.0 (#135733)
This PR is modified cherry-pick of https://github.com/intel/llvm/commit/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.
This commit is contained in:
@@ -411,6 +411,9 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
|
|||||||
set( LIBCLC_ARCH_OBJFILE_DIR "${LIBCLC_OBJFILE_DIR}/${arch_suffix}" )
|
set( LIBCLC_ARCH_OBJFILE_DIR "${LIBCLC_OBJFILE_DIR}/${arch_suffix}" )
|
||||||
file( MAKE_DIRECTORY ${LIBCLC_ARCH_OBJFILE_DIR} )
|
file( MAKE_DIRECTORY ${LIBCLC_ARCH_OBJFILE_DIR} )
|
||||||
|
|
||||||
|
# Build for OpenCL 3.0 independently of the target or device.
|
||||||
|
list( APPEND build_flags -cl-std=CL3.0 )
|
||||||
|
|
||||||
string( TOUPPER "CLC_${MACRO_ARCH}" CLC_TARGET_DEFINE )
|
string( TOUPPER "CLC_${MACRO_ARCH}" CLC_TARGET_DEFINE )
|
||||||
|
|
||||||
list( APPEND build_flags
|
list( APPEND build_flags
|
||||||
|
|||||||
Reference in New Issue
Block a user