diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-06-02 19:30:55 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-06-25 19:34:48 +0200 |
commit | 3f889606c7debafacd3da9c9e74caa61b45a13ff (patch) | |
tree | 2bc4821baebd6e50bfd2999d034328d60c596ff2 /mesonbuild/ast/introspection.py | |
parent | 0f237b8d1d84e4906c758bbef44d81e93207f8e4 (diff) | |
download | meson-3f889606c7debafacd3da9c9e74caa61b45a13ff.zip meson-3f889606c7debafacd3da9c9e74caa61b45a13ff.tar.gz meson-3f889606c7debafacd3da9c9e74caa61b45a13ff.tar.bz2 |
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.
Diffstat (limited to 'mesonbuild/ast/introspection.py')
-rw-r--r-- | mesonbuild/ast/introspection.py | 3 |
1 files changed, 2 insertions, 1 deletions
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) |