diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-03-12 10:03:24 -0500 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-03-12 22:08:33 +0100 |
commit | 1f3bf0f1357a20d9975a2de54e0fd097fc52424f (patch) | |
tree | 1e072df4ee539a111d355dfe1992420d904f3d29 /mesonbuild/interpreter.py | |
parent | 88013815633759fd499bde9e0173aaf9024604b1 (diff) | |
download | meson-1f3bf0f1357a20d9975a2de54e0fd097fc52424f.zip meson-1f3bf0f1357a20d9975a2de54e0fd097fc52424f.tar.gz meson-1f3bf0f1357a20d9975a2de54e0fd097fc52424f.tar.bz2 |
interpreter: Cache found dependency before converting for include_type
Fixes: #8516.
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 68744ef..f169d59 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -3704,13 +3704,6 @@ external dependencies (including libraries) must go to "dependencies".''') if not d.found() and not_found_message: self.message_impl([not_found_message]) self.message_impl([not_found_message]) - # Ensure the correct include type - if 'include_type' in kwargs: - wanted = kwargs['include_type'] - actual = d.include_type_method([], {}) - if wanted != actual: - mlog.debug(f'Current include type of {name} is {actual}. Converting to requested {wanted}') - d = d.as_system_method([wanted], {}) # Override this dependency to have consistent results in subsequent # dependency lookups. if name and d.found(): @@ -3719,6 +3712,13 @@ external dependencies (including libraries) must go to "dependencies".''') if identifier not in self.build.dependency_overrides[for_machine]: self.build.dependency_overrides[for_machine][identifier] = \ build.DependencyOverride(d.held_object, node, explicit=False) + # Ensure the correct include type + if 'include_type' in kwargs: + wanted = kwargs['include_type'] + actual = d.include_type_method([], {}) + if wanted != actual: + mlog.debug(f'Current include type of {name} is {actual}. Converting to requested {wanted}') + d = d.as_system_method([wanted], {}) return d def dependency_impl(self, name, display_name, kwargs, force_fallback=False): |