[swift-dev] Pathway to becoming an effective contributor

Natthan Leong kar.joon at icloud.com
Wed Jun 21 16:42:09 CDT 2017

I was not aware of the 'ninja' commands as I have always been using the
documented utils/build-script. Thank you for sharing tips from your development
workflow too. I will try it out!



> On Jun 21, 2017, at 2:25 PM, Slava Pestov <spestov at apple.com> wrote:
>> On Jun 21, 2017, at 2:12 PM, Natthan Leong via swift-dev <swift-dev at swift.org <mailto:swift-dev at swift.org>> wrote:
>> Hi,
>> As someone who also recently started contributing, I was surprised to discover
>> how much computing power was needed to build Swift. My first few build attempts
>> on a mid-2014 rMBP took more than an hour with 100% CPU utilization which is
>> unsustainable for future participation.
> A clean build of LLVM, swift, and the standard library takes a while, but most of the time you shouldn’t have to rebuild everything from scratch.
> For example if I’m just iterating on the compiler, I can edit a couple of source files and run ‘ninja swift’ and have a new compiler binary ready to test in a few seconds. I only rebuild the standard library if absolutely necessary, since that takes longer, but even then ‘ninja swift-stdlib’ is only a few minutes.
> Also I always do release builds during normal development, only doing a debug build if I have to run the debugger which isn’t very often. Release builds produce a faster swiftc, so the standard library is built faster, and also they link faster.
> Finally, it is possible to run only a subset of the validation tests while you’re iterating on a specific feature, instead of having to wait the ~15 minutes for ‘ninja check-swift-validation’, by directly invoking lit.
> Slava

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

More information about the swift-dev mailing list