dependencies: Add ext_deps to all dependencies

I'll be using this later, but it seems useful to allow dependencies to
that have special handlers to declare that they depend on other
dependencies. This should allow us to stop treating threads special
internally and just make it a normal dependency.
pull/5225/head
Dylan Baker 6 years ago
parent b1aa54bb29
commit b842b0b04a
  1. 1
      mesonbuild/build.py
  2. 1
      mesonbuild/dependencies/base.py

@ -1035,6 +1035,7 @@ This will become a hard error in a future Meson release.''')
if dep not in self.external_deps:
self.external_deps.append(dep)
self.process_sourcelist(dep.get_sources())
self.add_deps(dep.ext_deps)
elif isinstance(dep, BuildTarget):
raise InvalidArguments('''Tried to use a build target as a dependency.
You probably should put it in link_with instead.''')

@ -115,6 +115,7 @@ class Dependency:
self.raw_link_args = None
self.sources = []
self.methods = self._process_method_kw(kwargs)
self.ext_deps = [] # type: List[Dependency]
def __repr__(self):
s = '<{0} {1}: {2}>'

Loading…
Cancel
Save