Mesa (main): gallium/clover: pass -no-opaque-pointers to Clang

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun May 8 20:21:18 UTC 2022


Module: Mesa
Branch: main
Commit: 06e9607478b780c9bcc6e08d69cfbe9020b4602c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=06e9607478b780c9bcc6e08d69cfbe9020b4602c

Author: Thomas Debesse <dev at illwieckz.net>
Date:   Mon Apr 25 09:01:01 2022 +0200

gallium/clover: pass -no-opaque-pointers to Clang

Clang opaque pointers have been enabled by default
but the Clover code currently expects them to be disabled.

Signed-off-by: Thomas Debesse <dev at illwieckz.net>
Reviewed-by: Francisco Jerez <currojerez at riseup.net>

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6342
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16129>

---

 src/gallium/frontends/clover/llvm/invocation.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/gallium/frontends/clover/llvm/invocation.cpp b/src/gallium/frontends/clover/llvm/invocation.cpp
index 1e5f3266c26..6c344f98fb1 100644
--- a/src/gallium/frontends/clover/llvm/invocation.cpp
+++ b/src/gallium/frontends/clover/llvm/invocation.cpp
@@ -226,6 +226,13 @@ namespace {
       // class to recognize it as an OpenCL source file.
 #if LLVM_VERSION_MAJOR >= 12
       std::vector<const char *> copts;
+#if LLVM_VERSION_MAJOR >= 15
+      // Since LLVM commit 702d5de4 opaque pointers are enabled by default:
+      // https://gitlab.freedesktop.org/mesa/mesa/-/issues/6342
+      // A better implementation may be doable following suggestions from there:
+      // https://github.com/llvm/llvm-project/issues/54970#issuecomment-1102254254
+      copts.push_back("-no-opaque-pointers");
+#endif
       for (auto &opt : opts) {
          if (opt == "-cl-denorms-are-zero")
             copts.push_back("-fdenormal-fp-math=positive-zero");



More information about the mesa-commit mailing list