diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-05-20 22:50:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-20 22:50:12 +0300 |
commit | ef024583df79d30c0011914603a3212fd139ca3a (patch) | |
tree | c4cc86b679c31f75b6ffdc2d1cb53a880539c9d2 /mesonbuild/interpreter.py | |
parent | fb35e6faac2a5efbb8fd0ff6ee5627b144adb184 (diff) | |
parent | 146e97e974fe02f93e3fb20d2a1cb850255f69fc (diff) | |
download | meson-ef024583df79d30c0011914603a3212fd139ca3a.zip meson-ef024583df79d30c0011914603a3212fd139ca3a.tar.gz meson-ef024583df79d30c0011914603a3212fd139ca3a.tar.bz2 |
Merge pull request #5276 from dcbaker/pkg-config-path-invalidate-cache
coredata: add pkg_config_path to depedency cache key
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index ea99a43..678560f 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -2859,14 +2859,13 @@ external dependencies (including libraries) must go to "dependencies".''') # FIXME: Not all dependencies support such a distinction right now, # and we repeat this check inside dependencies that do. We need to # consolidate this somehow. - is_cross = self.environment.is_cross_build() - if 'native' in kwargs and is_cross: - want_cross = not kwargs['native'] + if self.environment.is_cross_build() and kwargs.get('native', False): + for_machine = MachineChoice.BUILD else: - want_cross = is_cross + for_machine = MachineChoice.HOST - identifier = dependencies.get_dep_identifier(name, kwargs, want_cross) - cached_dep = self.coredata.deps.get(identifier) + identifier = dependencies.get_dep_identifier(name, kwargs) + cached_dep = self.coredata.deps[for_machine].get(identifier) if cached_dep: if not cached_dep.found(): mlog.log('Dependency', mlog.bold(name), @@ -3018,7 +3017,11 @@ external dependencies (including libraries) must go to "dependencies".''') # cannot cache them. They must always be evaluated else # we won't actually read all the build files. if dep.found(): - self.coredata.deps[identifier] = dep + if self.environment.is_cross_build() and kwargs.get('native', False): + for_machine = MachineChoice.BUILD + else: + for_machine = MachineChoice.HOST + self.coredata.deps[for_machine].put(identifier, dep) return DependencyHolder(dep, self.subproject) if has_fallback: |