discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: building GNUstep from scratch


From: David Chisnall
Subject: Re: building GNUstep from scratch
Date: Wed, 22 Aug 2018 18:23:25 +0100

On 22 Aug 2018, at 11:07, Andreas Fink <afink@list.fink.org> wrote:
> 
> git clone https://git.llvm.org/git/llvm.git/
> cd llvm/tools
> git clone https://git.llvm.org/git/clang.git/
> cd ../projects
> git clone https://git.llvm.org/git/compiler-rt.git/
> git clone https://git.llvm.org/git/openmp.git/
> git clone https://git.llvm.org/git/libcxx.git/
> git clone https://git.llvm.org/git/libcxxabi.git/
> git clone https://git.llvm.org/git/test-suite.git/
> cmake .. -DCMAKE_BUILD_TYPE=Release
> make -j8 install
> 
> 
> This takes quite some time and lots of memory. If you forget 
> -DCMAKE_BUILD_TYPE=Release you end up with 32 gigabytes of RAM not being 
> sufficient (constantly swapping) and compile times of hours to days. On 32bit 
> machines its even worse due to the 4GB memory limit.

The only bits of this that you need are llvm and clang.  There is no point 
building any of the other bits, because you won’t be using them.  If you really 
want to build them, then it’s a good idea to:

1) Use Ninja, not Make (-G Ninja to cmake, ninja instead of make -j8 for the 
build)
2) Set the maximum number of link jobs to something small (I forget the exact 
flag for this.  Run ccmake . and find it in the GUI)
3) Use lld as the linker (uses vastly less RAM than GNU BFD ld, not tried Gold)

That said, if you’re on Debian then you can just go to apt.llvm.org and 
download the latest nightly build, or wait until 7.0 is released and then use 
that.

David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]