17 ms·
Yes, linking LLVM takes up a lot of memory. The documented guidance is to allow one link job per 15 GB of RAM [1]. [1] https://llvm.org/docs/CMake.html#frequen
by collinfunk 11mo ago
Yes, linking LLVM takes up a lot of memory. The documented guidance is to allow one link job per 15 GB of RAM [1].
[1] https://llvm.org/docs/CMake.html#frequently-used-llvm-related-variables https://llvm.org/docs/CMake.html#frequently-used-llvm-relate...
- brucehoult 11mo agoAnd, fairly uniquely, LLVM has a LLVM_PARALLEL_LINK_JOBS setting that is distinct from the number of parallel jobs for everything else. I think I was using that 15 years ago. I wish GCC had it. I have a quad core machine with 16 GB RAM that OOMs on building recent GCC -- 15 and HEAD for sure, can't remember whether 14 is affected. Enabling even 1 GB of swap makes it work. The culprit is four parallel link jobs needing ~4 GB each. There are only four of them, so a -j8 build (e.g., with HT) is no worse.
- Narishma 11mo agoIs that why the Rust toolchain can't be compiled on a 32-bit system?
- the_mitsuhiko 11mo agoIt's part of the problem. Pretty sure though even rustc at this point needs more than 3GB of addressable memory.