diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-10-24 14:55:15 -0700 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-12-17 14:47:18 -0800 |
| commit | e1164f616db78050b935e85fbc2cdb9f731e1511 (patch) | |
| tree | 0bd79c4ebc99816a6301de091f770047f04e369b /mesonbuild/interpreter/dependencyfallbacks.py | |
| parent | 7ddd0732c27d97fbf36a96c8c3d6bd81cc28ad0f (diff) | |
| download | meson-e1164f616db78050b935e85fbc2cdb9f731e1511.tar.gz | |
dependencies: Require 'native' be passed in kwargs
This simplifies a bunch of cases, and likely fixes some annoying bugs
in cross compile situations where should have been passing this and
weren't.
Diffstat (limited to 'mesonbuild/interpreter/dependencyfallbacks.py')
| -rw-r--r-- | mesonbuild/interpreter/dependencyfallbacks.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/interpreter/dependencyfallbacks.py b/mesonbuild/interpreter/dependencyfallbacks.py index baf5ea39e..4e4dcde56 100644 --- a/mesonbuild/interpreter/dependencyfallbacks.py +++ b/mesonbuild/interpreter/dependencyfallbacks.py @@ -8,7 +8,7 @@ from .. import mlog from .. import dependencies from .. import build from ..wrap import WrapMode -from ..mesonlib import stringlistify, version_compare_many, MachineChoice +from ..mesonlib import stringlistify, version_compare_many from ..options import OptionKey from ..dependencies import Dependency, DependencyException, NotFoundDependency from ..interpreterbase import (MesonInterpreterObject, FeatureNew, @@ -96,7 +96,7 @@ class DependencyFallbacksHolder(MesonInterpreterObject): self._handle_featurenew_dependencies(name) dep = dependencies.find_external_dependency(name, self.environment, kwargs) if dep.found(): - for_machine = kwargs.get('native', MachineChoice.HOST) + for_machine = kwargs['native'] identifier = dependencies.get_dep_identifier(name, kwargs) self.coredata.deps[for_machine].put(identifier, dep) return dep @@ -209,7 +209,7 @@ class DependencyFallbacksHolder(MesonInterpreterObject): # of None in the case the dependency is cached as not-found, or if cached # version does not match. In that case we don't want to continue with # other candidates. - for_machine = kwargs.get('native', MachineChoice.HOST) + for_machine = kwargs['native'] identifier = dependencies.get_dep_identifier(name, kwargs) wanted_vers = stringlistify(kwargs.get('version', [])) @@ -366,7 +366,7 @@ class DependencyFallbacksHolder(MesonInterpreterObject): # Override this dependency to have consistent results in subsequent # dependency lookups. for name in self.names: - for_machine = kwargs.get('native', MachineChoice.HOST) + for_machine = kwargs['native'] identifier = dependencies.get_dep_identifier(name, kwargs) if identifier not in self.build.dependency_overrides[for_machine]: self.build.dependency_overrides[for_machine][identifier] = \ |
