[PATCH] D115416: [lld-macho] Prevent writing map files on the critical path
Vy Nguyen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 8 20:31:25 PST 2021
oontvoo added a comment.
In D115416#3181832 <https://reviews.llvm.org/D115416#3181832>, @int3 wrote:
> did you forget to add the implementation of `writeMapAsync`?
Isn't line 1151, `writeMapAsync` a variable? :) (not a func call)
================
Comment at: lld/MachO/Writer.cpp:1151-1152
finalizeAddresses();
+ std::future<void> writeMapAsync(std::async(writeMapFile));
finalizeLinkEditSegment();
writeOutputFile();
----------------
int3 wrote:
> oontvoo wrote:
> >
> yeah, I don't think the map file contains anything from LinkEdit, but just to be safe I would move it after everything's finalized. I'm assuming `writeOutputFile` takes longer than `writeMapAsync` anyway
PS: actually, dont you want `std::future<void> writeMapAsync (std::async(std::launch::async, []{ writeMapFile(); })); ` ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115416/new/
https://reviews.llvm.org/D115416
More information about the llvm-commits
mailing list