From: Luo Xionghu <[email protected]> the clang 3.5 will call CallGraphSCCPass to add attribute "Attribute::ReadOnly" for these parameters only reads memeory, but this attribute is not supported in the VerifierPass of llvm 3.3. This is a bug of llvm 3.3.
v2: disable this extension in runtime for old llvm. Signed-off-by: Luo Xionghu <[email protected]> --- src/cl_extensions.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cl_extensions.c b/src/cl_extensions.c index cea2dd8..adcf82e 100644 --- a/src/cl_extensions.c +++ b/src/cl_extensions.c @@ -1,3 +1,4 @@ +#include "llvm/Config/llvm-config.h" #ifdef HAS_EGL #include "EGL/egl.h" #include "EGL/eglext.h" @@ -37,8 +38,10 @@ void check_opt1_extension(cl_extensions_t *extensions) { if (id == EXT_ID(khr_icd)) extensions->extensions[id].base.ext_enabled = 1; +#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5 if (id == EXT_ID(khr_spir)) extensions->extensions[id].base.ext_enabled = 1; +#endif } } -- 1.9.1 _______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
