Mesa (main): meson/clover: Getting clover can be built with no-rtti llvm in mingw

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 16 21:16:59 UTC 2022


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

Author: Yonggang Luo <luoyonggang at gmail.com>
Date:   Thu Jun 16 01:42:49 2022 +0800

meson/clover: Getting clover can be built with no-rtti llvm in mingw

Signed-off-by: Yonggang Luo <luoyonggang at gmail.com>
Acked-by: Dylan Baker <dylan at pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17055>

---

 meson.build | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index 44028f07a8a..555e6ae32fd 100644
--- a/meson.build
+++ b/meson.build
@@ -1782,10 +1782,10 @@ if with_llvm
     error('Lavapipe requires LLVM draw support.')
   endif
 
-  if cc.get_argument_syntax() != 'msvc'
+  if host_machine.system() != 'windows'
     # LLVM can be built without rtti, turning off rtti changes the ABI of C++
     # programs, so we need to build all C++ code in mesa without rtti as well to
-    # ensure that linking works. Note that MSVC does handle mismatching RTTI
+    # ensure that linking works. Note that Win32 compilers does handle mismatching RTTI
     # without issues, so only apply this for other compilers.
     if dep_llvm.type_name() == 'internal'
       _llvm_rtti = subproject('llvm').get_variable('has_rtti', true)
@@ -1800,7 +1800,9 @@ if with_llvm
         error('LLVM was built without RTTI, so Mesa must also disable RTTI. Use an LLVM built with LLVM_ENABLE_RTTI or add cpp_rtti=false.')
       endif
     endif
-  else
+  endif
+
+  if cc.get_argument_syntax() == 'msvc'
     # Suppress "/DELAYLOAD:ole32.dll/shell32.dll ignored" warnings that LLVM adds
     add_project_link_arguments(
       '/ignore:4199',



More information about the mesa-commit mailing list