Posts: 1,469
Threads: 57
Joined: Jul 2012
Thanks: 66
Given 127 thank(s) in 108 post(s)
I tested switching from clang to gcc with ccache. That seemed to fix the issue I was having, and now compilations are ~3x faster for a regular build and ~5x faster for a straight rebuild.
I'm going to test with just the linux x86 and 64 build on ccache for now, to see if any problems come up. If they don't then I'll roll it out to all of the other builds also.
Posts: 721
Threads: 77
Joined: Apr 2014
Thanks: 113
Given 130 thank(s) in 91 post(s)
You could try using the symlink method to fix the clang issue. It is described in the manual. The idea is to masquadate ccache as the compiler binary using symlinks. In Debian the symlinks are prepared in advance and this it's as simple as running `export PATH=/usr/lib/ccache/:$PATH` before running cmake.
Posts: 1,469
Threads: 57
Joined: Jul 2012
Thanks: 66
Given 127 thank(s) in 108 post(s)
Only problem: /usr/lib/ccache/clang doesn't exist, so that method couldn't work.
Posts: 1,469
Threads: 57
Joined: Jul 2012
Thanks: 66
Given 127 thank(s) in 108 post(s)
How would that help? It's not a "magic directory", so what would that command actually do?
Posts: 1,469
Threads: 57
Joined: Jul 2012
Thanks: 66
Given 127 thank(s) in 108 post(s)
I think you may have mistyped your command. Did you mean:
cd /usr/lib/ccache/ && ln -s /usr/bin/ccache clang
Posts: 1,469
Threads: 57
Joined: Jul 2012
Thanks: 66
Given 127 thank(s) in 108 post(s)
Using the symlink method allows clang to operate well.
The builds appear to be stable, and I'm going to try to roll out ccache to the other ones if I can.
Posts: 721
Threads: 77
Joined: Apr 2014
Thanks: 113
Given 130 thank(s) in 91 post(s)
Great!
Consider enabling the hard_link (CCACHE_HARDLINK) option, it will save some disk writing,
"If true, ccache will attempt to use hard links from the cache directory when creating the compiler output rather than using a file copy. Using hard links may be slightly faster in some situations, but can confuse programs like “make” that rely on modification times. Another thing to keep in mind is that if the resulting object file is modified in any way, this corrupts the cached object file as well. Hard links are never made for compressed cache files. This means that you should not enable compression if you want to use hard links. The default is false. "