From e1d611410f3f2596d8231e590c1f5c78a45d6097 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 9 Nov 2025 16:09:38 +0200 Subject: Add cpp_importstd option. The reason it is a string array is that this allows us to add more values than true/false should it be needed. For an example see `b_lto`. --- mesonbuild/compilers/cpp.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mesonbuild/compilers/cpp.py') diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index 198e5b631..908d6dc45 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -465,6 +465,13 @@ class GnuCPPCompiler(_StdCPPLibMixin, GnuCPPStds, GnuCompiler, CPPCompiler): 'Standard Win libraries to link against', gnu_winlibs) + if version_compare(self.version, '>=15.1'): + key = key.evolve(name='cpp_importstd') + opts[key] = options.UserComboOption(self.make_option_name(key), + 'Use #import std.', + 'false', + choices=['false', 'true']) + return opts def get_option_compile_args(self, target: 'BuildTarget', subproject: T.Optional[str] = None) -> T.List[str]: -- cgit v1.2.3