<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I just wrote up a document describing why this is tricky. :-) Check it out: <a href="https://github.com/apple/swift/blob/master/docs/Driver.md" class="">https://github.com/apple/swift/blob/master/docs/Driver.md</a></div><div class=""><br class=""></div><div class="">Jordan</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 28, 2016, at 14:05, Oscar Bonilla via swift-dev <<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family:verdana,sans-serif">Hi Daniel,</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br class=""></div><div class="gmail_default" style="font-family:verdana,sans-serif">Thanks for the reply. It seems that maybe this should be a collaboration between the swift compiler and the build system. I'm thinking something along the lines of the swift compiler being able to print out a list of file-level dependencies that the build system can use to decide whether to compile files or reuse compiled objects?</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br class=""></div><div class="gmail_default" style="font-family:verdana,sans-serif">If the swift compiler could produce as a side effect of the compilation a list of files (with checksums) that it used, in theory it would be possible to checksum those files on another compilation (in a different machine) and reuse the object files right?</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br class=""></div><div class="gmail_default" style="font-family:verdana,sans-serif">Does that seem reasonable/doable?</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br class=""></div><div class="gmail_default" style="font-family:verdana,sans-serif">Thanks!</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br class=""></div><div class="gmail_default" style="font-family:verdana,sans-serif">-Oscar</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br class=""></div></div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class="">-- <div class=""><b class="">Oscar Bonilla</b></div><div class="">Staff Software Engineer</div><div class="">Tools Group</div><div class=""><br class=""></div><div class=""><img src="https://snap.licdn.com/microsites/content/dam/brand/site/brand-assets/li-logo-sig.png" class=""><br class=""></div><div class=""><br class=""></div><div class=""><a href="mailto:obonilla@linkedin.com" target="_blank" class="">obonilla@linkedin.com</a></div><div class=""><span style="margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:17px;font-family:Helvetica,Arial,sans-serif;font-size:13px;vertical-align:middle;color:rgb(102,105,106);display:inline-block;zoom:1" class=""><a href="http://linkedin.com/in/" target="_blank" class="">linkedin.com/in/</a></span><span style="margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:17px;font-family:Helvetica,Arial,sans-serif;font-size:13px;vertical-align:middle;color:rgb(51,51,51);display:inline-block;zoom:1" class="">seeob</span><br class=""></div></div></div></div>
<br class=""><div class="gmail_quote">On Tue, Sep 27, 2016 at 12:47 PM, Daniel Dunbar <span dir="ltr" class=""><<a href="mailto:daniel_dunbar@apple.com" target="_blank" class="">daniel_dunbar@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Hi Oscar,<div class=""><br class=""></div><div class="">Nothing exists like that for Swift yet -- it is non-trivial for several reasons, the big two are:</div><div class="">1. The Swift compilation model relies on global information for a module, and needs to see all the sources. This process is currently embedded in the `swiftc` driver which would need to be aware of how to manage this process (or factored into a library API that a client able to manage the distribution could interact with).</div><div class="">2. The Swift compilation model also heavily leverages the ability to import Clang modules, which means that it *also* needs to be able to see large amounts of C headers, in modular model not a header preprocessing model. The distribution mechanism would also need to be aware of this.</div><span class="HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div><div class=""> - Daniel</div></font></span><div class=""><br class=""><div class=""><blockquote type="cite" class=""><span class=""><div class="">On Sep 27, 2016, at 11:09 AM, Oscar Bonilla via swift-dev <<a href="mailto:swift-dev@swift.org" target="_blank" class="">swift-dev@swift.org</a>> wrote:</div><br class=""></span><div class=""><div class=""><div class="h5"><div dir="ltr" class=""><div class="gmail_default" style="font-family:verdana,sans-serif">Hello swift developers,</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br class=""></div><div class="gmail_default" style="font-family:verdana,sans-serif">I was wondering if any of you knows anything about something</div><div class="gmail_default" style="font-family:verdana,sans-serif">like ccache and/or distcc for swift.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br class=""></div><div class="gmail_default" style="font-family:verdana,sans-serif">Basically, what I want is to speed up compiles by caching the result</div><div class="gmail_default" style="font-family:verdana,sans-serif">(like ccache does) and then reusing the compilation results across</div><div class="gmail_default" style="font-family:verdana,sans-serif">multiple machines.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br class=""></div><div class="gmail_default" style="font-family:verdana,sans-serif">Does anything like that exist for swift? I looked at ccache but they</div><div class="gmail_default" style="font-family:verdana,sans-serif">don't support swift and I couldn't find anything on distcc either.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br class=""></div><div class="gmail_default" style="font-family:verdana,sans-serif">Thanks!</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br class=""></div><div class="gmail_default" style="font-family:verdana,sans-serif">-Oscar</div>
</div></div></div><span class="">
______________________________<wbr class="">_________________<br class="">swift-dev mailing list<br class=""><a href="mailto:swift-dev@swift.org" target="_blank" class="">swift-dev@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-dev" target="_blank" class="">https://lists.swift.org/<wbr class="">mailman/listinfo/swift-dev</a><br class=""></span></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div>
_______________________________________________<br class="">swift-dev mailing list<br class=""><a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-dev<br class=""></div></blockquote></div><br class=""></body></html>