aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/cpp.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-07-26 14:38:44 -0700
committerDylan Baker <dylan@pnwbakers.com>2021-08-16 16:21:51 -0700
commite3c72ad7c796fb69db998e87e1e2e4e7c834e081 (patch)
treef617aa37a0394372b29e17df061e5d977b807c24 /mesonbuild/compilers/cpp.py
parente9639be16790f94d759ea8467541e3a471565622 (diff)
downloadmeson-e3c72ad7c796fb69db998e87e1e2e4e7c834e081.zip
meson-e3c72ad7c796fb69db998e87e1e2e4e7c834e081.tar.gz
meson-e3c72ad7c796fb69db998e87e1e2e4e7c834e081.tar.bz2
compilers: Fix extra_args parameter
which can also be a callable taking a CompileChekcMode as an argumetn and returning a list of strings.
Diffstat (limited to 'mesonbuild/compilers/cpp.py')
-rw-r--r--mesonbuild/compilers/cpp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py
index 44155d1..1e46f26 100644
--- a/mesonbuild/compilers/cpp.py
+++ b/mesonbuild/compilers/cpp.py
@@ -99,7 +99,7 @@ class CPPCompiler(CLikeCompiler, Compiler):
def has_header_symbol(self, hname: str, symbol: str, prefix: str,
env: 'Environment', *,
- extra_args: T.Optional[T.List[str]] = None,
+ extra_args: T.Union[None, T.List[str], T.Callable[[CompileCheckMode], T.List[str]]] = None,
dependencies: T.Optional[T.List['Dependency']] = None) -> T.Tuple[bool, bool]:
# Check if it's a C-like symbol
found, cached = super().has_header_symbol(hname, symbol, prefix, env,