It's likely that all object files are built with very few different
tools, evne just one. Updating the build info multiple times from the
same tool is pointless.
void Binary::collect_build_info(BuildInfo &binfo) const
{
+ vector<const Tool *> tools;
for(ObjectFile *o: objects)
if(const Tool *obj_tool = o->get_tool())
- binfo.update_from(obj_tool->get_build_info());
+ if(!any_equals(tools, obj_tool))
+ tools.push_back(obj_tool);
+ for(const Tool *t: tools)
+ binfo.update_from(t->get_build_info());
Target::collect_build_info(binfo);