+ chains.push_back(chain);
+}
+
+bool Toolchain::has_tool(const string &tag) const
+{
+ if(tools.count(tag))
+ return true;
+ return any_of(chains.begin(), chains.end(), [&tag](Toolchain *tc){ return tc->has_tool(tag); });
+}
+
+Tool &Toolchain::get_tool(const string &tag) const
+{
+ if(!tools.count(tag))
+ {
+ for(const Toolchain *c: chains)
+ if(c->has_tool(tag))
+ return c->get_tool(tag);
+ }
+