From f3b3bfbe3f20883e6d8c19c5f9f706f8e095bcfa Mon Sep 17 00:00:00 2001 From: Pierrick Bouvier Date: Tue, 30 Dec 2025 11:30:01 -0800 Subject: [PATCH] meson: enable cpp (optionally) for plugins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260124182921.531562-9-pierrick.bouvier@linaro.org Signed-off-by: Pierrick Bouvier --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index ad8550d9e9..149655058a 100644 --- a/meson.build +++ b/meson.build @@ -77,7 +77,8 @@ python = import('python').find_installation() cc = meson.get_compiler('c') all_languages = ['c'] -if host_os == 'windows' and add_languages('cpp', required: false, native: false) +enable_cpp = host_os == 'windows' or get_option('plugins') +if enable_cpp and add_languages('cpp', required: false, native: false) all_languages += ['cpp'] cxx = meson.get_compiler('cpp') endif