Patch switches computing of --build-id hash to tree.
This is the way when input data is splitted by chunks,
hash is computed for each one in threaded/non-threaded way.
At the end hash is conputed for result tree.
With or without -threads the result hash is the same.
This can be simplified.
while (Arr.size() > ChunkSize) { Ret.push_back(...); Arr = Arr.drop_front...; } if (!Arr.empty()) Ret.push_back(Arr); return Ret;