<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On May 28, 2013, at 12:00 PM, Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br><div><blockquote type="cite"><blockquote class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">+<br>+    tg.spawn([&, index] {<br>+      if (error_code ec = targetInfo.readFile(input.getPath(), files[index])) {<br>+        diagnostics << "Failed to read file: " << input.getPath()<br>+                    << ": " << ec.message() << "\n";<br>+        fail = true;<br>+        return;<br>+      }<br>+    });<br>+    ++index;<br></blockquote><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">It's coming back to the other thread, but if targetInfo needs to be updated during input file parsing, parallelizing this piece of code would result in unpredictable behavior. I'm not saying that we can't paralellize this but just don't have a good idea to deal with that.</div></blockquote></div><br><div>How fast can the linker options be extracted from the file?  If fast, then one model would be to make a serialized pass over the input files just to collect linker options and update target info, then the next pass would be the parallel parsing of the input files.  </div><div><br></div><div>-Nick</div><div><br></div></body></html>