From 3f889606c7debafacd3da9c9e74caa61b45a13ff Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Wed, 2 Jun 2021 19:30:55 +0200 Subject: Split compiler detection from Environment This moves all the compiler detection logic into the new compilers.detect module. This dramatically reduces the size and complexity of Environment. --- mesonbuild/ast/introspection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mesonbuild/ast') diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py index 97ebb5a..42813db 100644 --- a/mesonbuild/ast/introspection.py +++ b/mesonbuild/ast/introspection.py @@ -23,6 +23,7 @@ from ..mesonlib import MachineChoice, OptionKey from ..interpreterbase import InvalidArguments, TYPE_nvar from ..build import BuildTarget, Executable, Jar, SharedLibrary, SharedModule, StaticLibrary from ..mparser import BaseNode, ArithmeticNode, ArrayNode, ElementaryNode, IdNode, FunctionNode, StringNode +from ..compilers import detect_compiler_for import typing as T import os import argparse @@ -162,7 +163,7 @@ class IntrospectionInterpreter(AstInterpreter): for lang in sorted(langs, key=compilers.sort_clink): lang = lang.lower() if lang not in self.coredata.compilers[for_machine]: - self.environment.detect_compiler_for(lang, for_machine) + detect_compiler_for(self.environment, lang, for_machine) def func_dependency(self, node: BaseNode, args: T.List[TYPE_nvar], kwargs: T.Dict[str, TYPE_nvar]) -> None: args = self.flatten_args(args) -- cgit v1.1