[PATCH v6 01/27] meson: don't access 'cxx' object without checking cpp lang

Daniel P. BerrangĂ© <[email protected]> Wed, 11 Feb 2026 15:24:42 +0000
Newsgroups org.nongnu.qemu-rust,org.nongnu.qemu-devel
Message-ID <[email protected]>
Signed-off-by: Daniel P. BerrangĂ© <[email protected]>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 2d114e9018..9ad16d1998 100644
--- a/meson.build
+++ b/meson.build
@@ -3194,7 +3194,7 @@ if host_os == 'windows'
 endif
 
 # Detect if ConvertStringToBSTR has been defined in _com_util namespace
-if host_os == 'windows'
+if host_os == 'windows' and 'cpp' in all_languages
   has_convert_string_to_bstr = cxx.links('''
     #include <comutil.h>
     int main() {
-- 
2.53.0