diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-06-10 01:49:16 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-10 01:49:16 +0300 |
commit | 06df6e463f3d7f62676f8f9ce0cf81fbb4058eaf (patch) | |
tree | d6e80b4aa73a30e31861d35aa00127fd625fcca8 /mesonbuild/ast/introspection.py | |
parent | 6b4b601eafc5320e62060f39da5acad7c3007942 (diff) | |
parent | 6d6af46edcb765d7046533fdad4d03b0c0c9cd64 (diff) | |
download | meson-06df6e463f3d7f62676f8f9ce0cf81fbb4058eaf.zip meson-06df6e463f3d7f62676f8f9ce0cf81fbb4058eaf.tar.gz meson-06df6e463f3d7f62676f8f9ce0cf81fbb4058eaf.tar.bz2 |
Merge pull request #4010 from Ericson2314/purge-cross-conditional-preview
Purge much `is_cross` and `<things>_cross` without changing user interfaces---includes on #5263
Diffstat (limited to 'mesonbuild/ast/introspection.py')
-rw-r--r-- | mesonbuild/ast/introspection.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py index 5ac6133..617b140 100644 --- a/mesonbuild/ast/introspection.py +++ b/mesonbuild/ast/introspection.py @@ -18,6 +18,7 @@ from . import AstInterpreter from .. import compilers, environment, mesonlib, optinterpreter from .. import coredata as cdata +from ..mesonlib import MachineChoice from ..interpreterbase import InvalidArguments from ..build import Executable, Jar, SharedLibrary, SharedModule, StaticLibrary from ..mparser import BaseNode, ArithmeticNode, ArrayNode, ElementaryNode, IdNode, FunctionNode, StringNode @@ -127,11 +128,11 @@ class IntrospectionInterpreter(AstInterpreter): def func_add_languages(self, node, args, kwargs): args = self.flatten_args(args) - need_cross_compiler = self.environment.is_cross_build() - for lang in sorted(args, key=compilers.sort_clink): - lang = lang.lower() - if lang not in self.coredata.compilers: - self.environment.detect_compilers(lang, need_cross_compiler) + for for_machine in [MachineChoice.BUILD, MachineChoice.HOST]: + for lang in sorted(args, key=compilers.sort_clink): + lang = lang.lower() + if lang not in self.coredata.compilers[for_machine]: + self.environment.detect_compiler_for(lang, for_machine) def func_dependency(self, node, args, kwargs): args = self.flatten_args(args) @@ -195,10 +196,10 @@ class IntrospectionInterpreter(AstInterpreter): kwargs_reduced = {k: v for k, v in kwargs.items() if k in targetclass.known_kwargs and k in ['install', 'build_by_default', 'build_always']} kwargs_reduced = {k: v.value if isinstance(v, ElementaryNode) else v for k, v in kwargs_reduced.items()} kwargs_reduced = {k: v for k, v in kwargs_reduced.items() if not isinstance(v, BaseNode)} - is_cross = False + for_machine = MachineChoice.HOST objects = [] empty_sources = [] # Passing the unresolved sources list causes errors - target = targetclass(name, self.subdir, self.subproject, is_cross, empty_sources, objects, self.environment, kwargs_reduced) + target = targetclass(name, self.subdir, self.subproject, for_machine, empty_sources, objects, self.environment, kwargs_reduced) new_target = { 'name': target.get_basename(), |