}
}
- auto LinkLambda = [&,
- OutputFile](std::shared_ptr<raw_fd_ostream> Stream) {
- AllOK.fetch_and(linkDwarf(*Stream, BinHolder, *Map, *OptionsOrErr));
+ auto LinkLambda = [&, OutputFile](std::shared_ptr<raw_fd_ostream> Stream,
+ LinkOptions Options) {
+ AllOK.fetch_and(
+ linkDwarf(*Stream, BinHolder, *Map, std::move(Options)));
Stream->flush();
if (Verify && !NoOutput)
AllOK.fetch_and(verify(OutputFile, Map->getTriple().getArchName()));
// out the (significantly smaller) stack when using threads. We don't
// want this limitation when we only have a single thread.
if (ThreadCount == 1)
- LinkLambda(OS);
+ LinkLambda(OS, *OptionsOrErr);
else
- Threads.async(LinkLambda, OS);
+ Threads.async(LinkLambda, OS, *OptionsOrErr);
}
Threads.wait();