Closed Bug 275790 Opened 20 years ago Closed 6 years ago

more ccache friendly NSPR_CFLAGS

Categories

(Firefox Build System :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: basic, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

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 places. 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.
Attached patch patch (obsolete) — Splinter Review
Attached patch patch 2Splinter Review
oops attached the wrong file
Attachment #169428 - Attachment is obsolete: true
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. http://weblogs.mozillazine.org/roc/archives/2005/01/sharing_binarie.html
Attachment #169430 - Flags: review?(bryner) → review+
checked in. Thanks!
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
It appears that this may have regressed. I'm building on Linux with the following mozconfig: . $topsrcdir/browser/config/mozconfig ac_add_options --enable-application=browser ac_add_options --enable-debug ac_add_options --srcdir=.. mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@ 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.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee: bryner → nobody
QA Contact: asa → build.config
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.
We build NSPR and NSS using the Firefox build system nowadays.
Status: REOPENED → RESOLVED
Closed: 20 years ago6 years ago
Resolution: --- → WORKSFORME
Component: Build Config → General
Product: Firefox → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: