unable to build clang/llvm

I followed the instructions given on http://clang.llvm.org/get_started.html to build clang/llvm, but when I do make, I get the following errors.

collect2: ld terminated with signal 9 [Killed]
make[4]: *** [/home/me/build/Debug+Asserts/bin/clang] Error 1
make[4]: Leaving directory /home/me/build/tools/clang/tools/driver' make[3]: *** [all] Error 1 make[3]: Leaving directory /home/me/build/tools/clang/tools’
make[2]: *** [all] Error 1
make[2]: Leaving directory /home/me/build/tools/clang' make[1]: *** [clang/.makeall] Error 2 make[1]: Leaving directory /home/me/build/tools’
make: *** [all] Error 1

Any idea, what is wrong here?

Looks like you ran out of memory linking clang. You either need to
allocate more physical RAM (if you're using a VM), increase swap,
and/or build the release build instead (it uses less memory).

Hi,

I followed the instructions given on http://clang.llvm.org/get_started.html
to build clang/llvm, but when I do make, I get the following errors.

collect2: ld terminated with signal 9 [Killed]

Most likely you ran out of memory and the link step (ld) was killed.
Try monitoring usage while building to confirm. It's not entirely
clear what platform you're using, but possible solutions are:
+ Use ld.gold instead of (the usually default) ld.bfd
+ Don't parallelise the build (i.e. don't use "make -j4" or whatever)
+ Build the Release rather than Debug variant (handling the debugging
information makes up a large part of the memory usage).

Tim.