[PATCH] meson: don't access 'cxx' object without checking cpp lang

Daniel P. Berrangé posted 1 patch 6 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260210173355.776365-1-berrange@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] meson: don't access 'cxx' object without checking cpp lang
Posted by Daniel P. Berrangé 6 hours ago
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 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


Re: [PATCH] meson: don't access 'cxx' object without checking cpp lang
Posted by Pierrick Bouvier 5 hours ago
On 2/10/26 9:33 AM, Daniel P. Berrangé wrote:
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>   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() {

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>

Re: [PATCH] meson: don't access 'cxx' object without checking cpp lang
Posted by Paolo Bonzini 5 hours ago
On 2/10/26 18:33, Daniel P. Berrangé wrote:
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>   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() {

Acked-by: Paolo Bonzini <pbonzini@redhat.com>