> On Jun 21, 2017, at 2:12 PM, Natthan Leong via swift-dev 
> <swift-dev@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

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Reply via email to