clover/llvm: turn off optional CL 3 features.

We don't support these with clover yet, so turn them off to get
clang back to the older llvm 12 behaviour.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11752>
This commit is contained in:
Dave Airlie
2021-07-07 14:05:06 +10:00
committed by Marge Bot
parent 16793c8efa
commit 518b94e8e1

View File

@@ -242,6 +242,17 @@ namespace {
c->getTargetOpts().Triple = target.triple;
c->getLangOpts().NoBuiltin = true;
#if LLVM_VERSION_MAJOR >= 13
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("-__opencl_c_generic_address_space");
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("-__opencl_c_pipes");
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("-__opencl_c_device_enqueue");
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("-__opencl_c_program_scope_global_variables");
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("-__opencl_c_subgroups");
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("-__opencl_c_work_group_collective_functions");
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("-__opencl_c_atomic_scope_device");
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("-__opencl_c_atomic_order_seq_cst");
#endif
// This is a workaround for a Clang bug which causes the number
// of warnings and errors to be printed to stderr.
// http://www.llvm.org/bugs/show_bug.cgi?id=19735