[llvm-dev] Disk space and RAM requirements in docs

David Chisnall via llvm-dev llvm-dev at lists.llvm.org
Tue Apr 30 06:23:49 PDT 2019

On 30/04/2019 04:29, Petr Penzin via llvm-dev wrote:
> Hi,
> Have anybody recently built LLVM in Debug mode /within/ space 
> requirements from the Getting Started doc?
> https://llvm.org/docs/GettingStarted.html#hardware
>  > An LLVM-only build will need about 1-3 GB of space. A full build of 
> LLVM and Clang will need around 15-20 GB of disk space.
>  From my experience this numbers looks drastically low. On FreeBSD my 
> recent builds consumed more than 70 GB and on Linux - more than 60. I am 
> building LLVM, Clang, and LLD with all default targets and default 
> settings. On FreeBSD I am also building Polly. Also, building 
> `clang-check` target adds around to 20 GB to the build directory size.

It looks as if running the tests is adding a lot of space to your 
builds.  I have three LLVM trunk build directories on this machine 

Release, building clang, clang-tools-extras, and lld: 1.2GB
Debug, building clang, clang-tools-extras, and lld: 36GB
Debug + ASan, building clang, lldb, and lld: 40GB

1-3GB is still enough to do a release build and not run the tests.  I 
don't think I've ever done a 'ninja check' in any of these (I have other 
build directories for things I'm actively working on), so you can get 
down to under 40GB without running the tests for a Debug build.

I'd definitely recommend following Chandler's advice though and not 
bothering with a debug-without-asan build.  Debug builds are 
sufficiently slow that the overhead of Asan on top is not very big - 
working on a release build for fast testing and then switching to Asan + 
Debug for debugging is a nice way of working.


More information about the llvm-dev mailing list