macho: parallelize UUID hash calculation at the expense of full compatibility with ld64 #16097
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR effectively undos the following found in #13964:
This means we can now fully parallelize UUID calculation for MachO binaries at the expense of full compatibility with
ld64. This also means we are in-sync with LLVM's MachO LLD driver.This also implies that the following is no longer the case:
Since we now don't exclude debug info stabs from UUID calculation, the UUID values will differ for output binaries with and without debug info. If anyone relies on this feature, I would encourage you to let me know in the comments of this PR so that we can judge if it is a feature we should keep or is expendable. The main downside of status quo (and Apple's approach) is the fact that it is slow to evaluate, and while for small projects the difference will be negligible, for larger ones it will make a noticeable impact as shown below (
./zldrefers to the linker with the patch applied, while./zld_oldis the status quo):Finally, since we no longer aim at fully matching
ld64's behaviour, we can now close #14964.