How much disk space needed to compile swift?

I was trying to compile swift on a computer with ~50 GB of free disk space and about midway through the process the OS will give a low disk space alert and the build will fail with fatal error: bin/swift-ide-test: No space left on device. just how much disk space do I need to build swift?

Omitting the tiny projects, my Linux Ninja-RelWithDebInfoAssert build is

33G	  public/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64
37G   public/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64
133M  public/build/Ninja-RelWithDebInfoAssert/llbuild-linux-x86_64
213M  public/build/Ninja-RelWithDebInfoAssert/swiftpm-linux-x86_64
133M  public/build/Ninja-RelWithDebInfoAssert/foundation-linux-x86_64
70G   public/build/Ninja-RelWithDebInfoAssert

right now. :-/ I've heard it's a lot less if you compile without debug info. (It's about half that on macOS, which doesn't copy debug info around as much.)

This 70GB figure shows up in as well:

Getting Started
These instructions give the most direct path to a working Swift development environment. To build from source you will need about 2 GB of disk space for the source code and up to 70 GB of disk space for the build artifacts with full debugging.


i don’t know what to say

1 Like