Re: [PATCH v2 06/50] Add helper-to-tcg subproject

Alessandro Di Federico via qemu development <[email protected]>
Newsgroups gmane.comp.emulators.qemu
Message-ID <20260730175608.2fb2dd44@spawn>
On Thu, 30 Jul 2026 05:09:40 +0200
Anton Johansson via qemu development <[email protected]> wrote:

> +project('helper-to-tcg', ['cpp'],
> +        version: '0.8',
> +        default_options: ['cpp_std=c++17'])
>
> ...
>
> +# Find LLVM using llvm-config manually.  Needed as meson struggles when multiple
> +# versions of LLVM are installed on the same system (always returns the most
> +# recent).
> +llvm_config = get_option('llvm_config_path')
> +cpp_args = run_command(llvm_config, '--cxxflags').stdout().strip().split()

`llvm-config --cxxflags` cotains `-std=`, which takes precedence over
`cpp_std=c++17`.
As a result, on LLVM 15, we get `-std=c++14` and the build fails.

I'd just add on the next line:

cpp_args += '-std=c++17'

And drop `default_options`.

-- 
Alessandro Di Federico
rev.ng Labs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.