On our large iOS project this took a link from 1 minute 45 seconds to 45
seconds. For reference ld64 does the same link in ~20 seconds.
Details
- Reviewers
gkm int3 - Group Reviewers
Restricted Project - Commits
- rG63e65de3ffc2: [lld-macho] Cache discovered framework paths
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lld/MachO/Driver.cpp | ||
---|---|---|
109 | given that D113073 calls its map resolvedLibraries, maybe this should be resolvedFrameworks? | |
109 | also we should make sure to reset this map in cleanupCallback (see D112878: [MachO] Properly reset global state) | |
132–134 | code style is to use explicit type names instead of auto unless the type is something complicated like an iterator also I would personally prefer return resolvedPaths[key] = second;, but up to you |
Update format and add cleanup clear
lld/MachO/Driver.cpp | ||
---|---|---|
132–134 | Thanks for the feedback! Updated accordingly. Is it possible for us to setup some automation here to flag these? |
lld/MachO/Driver.cpp | ||
---|---|---|
132–134 |
I suspect it's hard because the rules can be ambiguous and sometimes opinion-based :) |
Thanks!
lld/MachO/Driver.cpp | ||
---|---|---|
132–134 | yeah I'm not aware of a way to lint for this... thanks for shortening the return + assignment! I was actually thinking we could go all the way and do away with saved too, i.e. just return resolvedFrameworks[key] = saver.save(suffixed.str());... then the if wouldn't need braces | |
137–138 | ditto, we could return the assignment value and do away with the braces |
given that D113073 calls its map resolvedLibraries, maybe this should be resolvedFrameworks?