I'm building LLVM & clang, and right now I'm running into "ld returned 5 exit status", meaning that it runs out of memory. Does anyone know if I can somehow reduce memory usage by doing the build in two parts or something? I've already tried -no-keep-memory to no avail and I've given ld as much memory as I can, but it always spikes in memory then crashes with exit code 5.
Looking around the internet, wxWidgets mentions that ld can throw that error when there are leftover elements from a previous attempt at building, and recommends trying to rebuild from a clean wxWidgets source directory. Maybe that can be of help?
Also, if you're on unix/linux there is almost certainly a prebuilt version of clang that you can install.