Mesa (main): clover/llvm: turn off optional CL 3 features.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Aug 5 07:22:31 UTC 2021
Module: Mesa
Branch: main
Commit: 518b94e8e1a4c9f2772bc4ab7a7b9cd140afbf46
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=518b94e8e1a4c9f2772bc4ab7a7b9cd140afbf46
Author: Dave Airlie <airlied at redhat.com>
Date: Wed Jul 7 14:05:06 2021 +1000
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 at microsoft.com>
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Acked-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11752>
---
src/gallium/frontends/clover/llvm/invocation.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/gallium/frontends/clover/llvm/invocation.cpp b/src/gallium/frontends/clover/llvm/invocation.cpp
index 30592e4343b..aada225e366 100644
--- a/src/gallium/frontends/clover/llvm/invocation.cpp
+++ b/src/gallium/frontends/clover/llvm/invocation.cpp
@@ -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
More information about the mesa-commit
mailing list