From b842b0b04aa8678f98cbec5f7022e75636ddf4a3 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 5 Apr 2019 16:19:30 -0700 Subject: [PATCH] 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. --- mesonbuild/build.py | 1 + mesonbuild/dependencies/base.py | 1 + 2 files changed, 2 insertions(+) diff --git a/mesonbuild/build.py b/mesonbuild/build.py index bcd1754e6..020c47b58 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.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.''') diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index af4b13fad..032fe60a6 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -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}>'