Compiling LLVM with distcc

First off, I'm not a cmake expert, so I'm not 100% sure if I'm doing this right, but it does seem to work... Basically, I wanted to distribute my LLVM builds across a set of machines, using distcc. This is what I did

  1. As root, the first thing to do is making sure you have distcc linked to various compilers, e.g

    $ sudo ln -s /usr/bin/distcc /usr/local/lib/distcc/gcc
    $ sudo ln -s /usr/bin/distcc /usr/local/lib/distcc/g++


  2. Run cmake like

    $ CC=/usr/local/lib/distcc/gcc CXX=/usr/local/lib/distcc/g++ cmake -DCMAKE_INSTALL_PREFIX=/opt/llvm -G "Unix Makefiles" ../src
    $ pump make -j30  CC=/usr/local/lib/distcc/gcc CXX=/usr/local/lib/distcc/g++


However, the final link stages did not fair well with the parallel make, so I had to run again, without a -j option to make.


Subscribe to RSS - C