Building the Swift compiler and Foundation on Linux

Before building the Swift compiler it might be a good idea to check https://github.com/apple/swift to verify the build is currently passing. And to free up as much memory as possible first you can shut down the graphical interface with sudo service lightdm stop.

(has been tested on Ubuntu 15.10):

… and then do something else for a while. On an iMac 2011 quad core with 16 GB of memory running a fresh install of Ubuntu 15.10 with no GUI it took 3 hours.

If you’re going to work on Foundation you will want to replace the last line with this:

Then just run ninja to build your changes and ninja test to test. Thankfully this is a lot faster than building swift.