FAQ update and Question on minimum build

Sorry to trouble you, great software, I have it on Ubuntu 14.10, Windows 10 and now I was trying ARM:

I have been trying to build a working Cland+LLVM for 4 days now, ARM Radxa Rock Pro Quad 1.6Ghz 2GB memory

I’m building on an SD card, I tried 4GB and died(space thing), 8GB and died(again with the space thing) so I read everything I could find on building only a minimum testing build and I came up with:

apt-get install subversion

svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm

cd llvm/tools

svn co http://llvm.org/svn/llvm-project/cfe/trunk clang

IS extra and compiler-rt NEEDED?

cd …/…

cd llvm/tools/clang/tools

svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk extra

cd …/…/…/…

cd llvm/projects

svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt

cd …/…

mkdir build

cd build

export LLVM_TARGETS_TO_BUILD=“ARM”

export LLVM_BUILD_TOOLS==OFF

export LLVM_INCLUDE_TOOLS=OFF

export LLVM_BUILD_EXAMPLES=OFF

export LLVM_INCLUDE_EXAMPLES=OFF

export LLVM_BUILD_TESTS=OFF

export LLVM_INCLUDE_TESTS=OFF

I force it to build only for ARM, No test, No Examples and I ended up with

In /build

Clang=9MB (Crashed building Clang)

lib=1.7GB

Bin=2.5GB

Main /llvm=531MB

In the directory where all LLVM lives including.subversion = 6.6GB

I only have 7.4GB total before the OS and Applications

So I died with the space issue, again.

So could someone please direct me to “How to Build CLANG with just LLVM” and add those instructions to FAQ?

Thanks

I’m going to reformat the SD card and only SV LLVM, CLANG, rm the projects folder to see what happens, day 5

This doesn't really answer your question, but have you considered doing a cross build from a faster machine with more memory?

Cheers,

Jon

Sorry to trouble you, great software, I have it on Ubuntu 14.10, Windows 10
and now I was trying ARM:

I have been trying to build a working Cland+LLVM for 4 days now, ARM Radxa
Rock Pro Quad 1.6Ghz 2GB memory

I'm building on an SD card, I tried 4GB and died(space thing), 8GB and
died(again with the space thing) so I read everything I could find on
building only a minimum testing build and I came up with:

apt-get install subversion

svn co <http://llvm.org/svn/llvm-project/llvm/trunk>
http://llvm.org/svn/llvm-project/llvm/trunk llvm

cd llvm/tools

svn co http://llvm.org/svn/llvm-project/cfe/trunk clang

#### IS extra and compiler-rt NEEDED?

cd ../..

cd llvm/tools/clang/tools

svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk extra

No, you don't need this in order to build "just clang+llvm"... it really is "extra".

cd ../../../..

cd llvm/projects

svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt

You probably *do* want this, unless you plan on using the system-provided libgcc instead.

So could someone please direct me to “How to Build CLANG with just LLVM” and
add those instructions to FAQ?

If you just want a working compiler, the Release build takes up
significantly less room than the Debug one (1.5GB vs 11GB on x86 OS
X).

Cheers.

Tim.

I've added the mailing list back to CC. I think it might be "configure
--enable-optimized", but I never use the autoconf build so wouldn't
swear to it. (It's definitely "cmake -DCMAKE_BUILD_TYPE=Release" for
the CMake build system).

Cheers.

Tim

Just as your email arrived I was replying about my finding the doc's:
I found it! I was looking for a RELEASE environment settings but it appears to be a command line switch for configure --enable-optimized
../llvm/configure --enable-optimized
http://llvm.org/docs/GettingStarted.html#local-llvm-configuration

The make file generated still showed all targets being built but I'll run it and see, the last time only ARM was built.
I had a 16GB SD card that turned out to be a 8 GB SD card, twice. I got my money back and ordered a new one from Amazon.
Thanks for all the replies.
Mail list, been awhile since I used one, must remember Reply All.

I don't have measurements for other configurations but the peak memory usage for a cmake build with BUILD_SHARED_LIBS=ON and debug info was ~7GB on my x86_64 machine when I last measured it. You might find that your target needs a fair bit of swap space too.

Also FWIW, I recently re-built the LLVM 3.5 binary packages on an EdgeRouter Pro which has 2GB RAM and 16GB swap (on a USB stick). The source and build directory is mounted via NFS and ended up at ~9GB.