From e3c72ad7c796fb69db998e87e1e2e4e7c834e081 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 26 Jul 2021 14:38:44 -0700 Subject: compilers: Fix extra_args parameter which can also be a callable taking a CompileChekcMode as an argumetn and returning a list of strings. --- mesonbuild/compilers/cpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/compilers/cpp.py') diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index 44155d1bd..1e46f26d1 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, -- cgit v1.2.3