diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-05-15 13:24:13 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-05-17 12:26:20 -0700 |
commit | 5df6823bd8abb3ea920c81259a38f55cfd5fa568 (patch) | |
tree | b34536f904affb35b5e221cb9b310bd21b35db88 /mesonbuild/mconf.py | |
parent | d941ca1b19e7016251966d676b33611f56dc56c1 (diff) | |
download | meson-5df6823bd8abb3ea920c81259a38f55cfd5fa568.zip meson-5df6823bd8abb3ea920c81259a38f55cfd5fa568.tar.gz meson-5df6823bd8abb3ea920c81259a38f55cfd5fa568.tar.bz2 |
coredata: Introduce a class to act as the dependency cache
Handling the PKG_CONFIG_PATH variable in meson introduces a new problem
for caching dependencies. We want to encode the pkg_config_path (or
cross_pkg_config_path if we're cross compiling) to be part of the key,
but we don't want to put that into the key for non-pkg-config
dependencies to avoid spurious cache misses (since pkg_config_path isn't
relevant to cmake, for example). However, on a cache lookup we can't
know that a dependency is a pkg-config dependency until we've looked in
the cache.
My solution is a two layer cache, the first layer remains the same as
before, the second layer is a dict-like object that encapsulates the
dependency type information and uses pkg_config_path and
cross_pkg_config_path as a sub key (and could be extended easily for
other types). A new object type is introduced to encapsulate this so
that callers don't need to be aware of the implementation details.
Diffstat (limited to 'mesonbuild/mconf.py')
0 files changed, 0 insertions, 0 deletions