[swift-dev] ccache and/or distcc for swift

Jordan Rose jordan_rose at apple.com
Wed Sep 28 16:10:09 CDT 2016


I just wrote up a document describing why this is tricky. :-) Check it out: https://github.com/apple/swift/blob/master/docs/Driver.md

Jordan


> On Sep 28, 2016, at 14:05, Oscar Bonilla via swift-dev <swift-dev at swift.org> wrote:
> 
> Hi Daniel,
> 
> 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?
> 
> 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?
> 
> Does that seem reasonable/doable?
> 
> Thanks!
> 
> -Oscar
> 
> 
> -- 
> Oscar Bonilla
> Staff Software Engineer
> Tools Group
> 
> 
> 
> obonilla at linkedin.com <mailto:obonilla at linkedin.com>
> linkedin.com/in/ <http://linkedin.com/in/>seeob
> 
> On Tue, Sep 27, 2016 at 12:47 PM, Daniel Dunbar <daniel_dunbar at apple.com <mailto:daniel_dunbar at apple.com>> wrote:
> Hi Oscar,
> 
> Nothing exists like that for Swift yet -- it is non-trivial for several reasons, the big two are:
> 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).
> 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.
> 
>  - Daniel
> 
>> On Sep 27, 2016, at 11:09 AM, Oscar Bonilla via swift-dev <swift-dev at swift.org <mailto:swift-dev at swift.org>> wrote:
>> 
>> Hello swift developers,
>> 
>> I was wondering if any of you knows anything about something
>> like ccache and/or distcc for swift.
>> 
>> Basically, what I want is to speed up compiles by caching the result
>> (like ccache does) and then reusing the compilation results across
>> multiple machines.
>> 
>> Does anything like that exist for swift? I looked at ccache but they
>> don't support swift and I couldn't find anything on distcc either.
>> 
>> Thanks!
>> 
>> -Oscar
>> _______________________________________________
>> swift-dev mailing list
>> swift-dev at swift.org <mailto:swift-dev at swift.org>
>> https://lists.swift.org/mailman/listinfo/swift-dev <https://lists.swift.org/mailman/listinfo/swift-dev>
> 
> 
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160928/e7211887/attachment.html>


More information about the swift-dev mailing list