I'm filing this under firefox because I don't know where to file this. This
affects all mozilla apps. The NSPR_CFLAGS could be more friendly towards people
who build with ccache http://ccache.samba.org/ or other compiler cache systems.
Currently it uses an absolute path, causing many false negative as the absolute
path is different between builds.
For example, I build xulrunner under a 'object-xulrunner' object dir. After that
I build firefox under 'object-firefox', since they are from the same source I
expect that there should be some cache hits. However due to the absolute dir
difference in NSPR_CFLAGS it would never hit the cache. I've a patch (coming up)
that makes it slightly better that gets NSPR_CFLAGS to use relative dirs in most
People using source based distros (with ccache enabled) like gentoo should
benefit from this too as they use different path to build each release. This
should increase the likelyhood of hitting the cache specially for minor releases.
Created attachment 169428 [details] [diff] [review]
Created attachment 169430 [details] [diff] [review]
oops attached the wrong file
Argh, you beat me to it! I've just done exactly this.
BTW check out my new blog post on this issue. It includes my solution to the
problem of hardlinking across multiple trees.
checked in. Thanks!
It appears that this may have regressed.
I'm building on Linux with the following mozconfig:
Here's a call to gcc for a random file out of my builds:
c++ -o json.o -c [snip] -I/mnt/mozbuilds/code/ff-4/src/obj-i686-pc-linux-gnu/dist/include/nspr [snip] ../../../js/src/json.cpp
As I understand it, the path to nspr here should be relative, not absolute.
It also appears that NSS is included with an absolute path.
This may no longer be necessary, since ccache 3.0pre0 appears to cache builds between different trees as is.