summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/cpp.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jussi.pakkanen@mailbox.org>2025-11-09 16:09:38 +0200
committerJussi Pakkanen <jussi.pakkanen@mailbox.org>2025-11-23 16:04:33 +0200
commite1d611410f3f2596d8231e590c1f5c78a45d6097 (patch)
tree55ca91e74efff248fb4c6f30ff4821dcff5a1da0 /mesonbuild/compilers/cpp.py
parent03a09266b59dabe437b1b8a3927adf266ce65890 (diff)
downloadmeson-e1d611410f3f2596d8231e590c1f5c78a45d6097.tar.gz
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`.
Diffstat (limited to 'mesonbuild/compilers/cpp.py')
-rw-r--r--mesonbuild/compilers/cpp.py7
1 files changed, 7 insertions, 0 deletions
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]: