2 ms·
>good luck compiling LLVM on it 4 cores, thus 2GB/core. Plenty.
by snvzz 2y ago
>good luck compiling LLVM on it
4 cores, thus 2GB/core. Plenty.
- AlotOfReading 2y agoI regularly get OOMs at 16 GB/core doing debug builds. LLVM is practically a memory stress test.
- 0x457 2y agoOnly if you use FatLTO. I've compiled LLVM many times with less memory. GCC on the other hand is another story. On a machine that I was able to compiled LLVM (thanks swap), I couldn't even extract GCC source code.
- CoastalCoder 2y agoI can't remember if LLVM has this problem specifically, but the linker step with debug info can really explode the memory use. And unfortunately, that's even without build parallelism.
- adgjlsfhk1 2y agomake -j4 for LLVM requires about 36GB (I know because I tried with 32GB). 16 gb is almost enough to maybe build a debug build of LLVM without threading, but it will take a few hours on a chip that slow. With only 8gb, you are going to be absolutely trashing your swap (which at pcie gen 1x2 speeds will be pretty darn torturous). I'm guessing this system will take ~8 hours to build LLVM.
- brucehoult 2y agoFortunately the LLVM build framework allows you to specify how many link steps can be done in parallel separately from the number of other things done in parallel. Also, linkers other than GNU `ld` (or `gold` which is faster but used more RAM) use a lot less RAM e.g. `mold`, or even better LLVM's own `lld`.