The default bug view has changed. See this FAQ.

more ccache friendly NSPR_CFLAGS

REOPENED
Unassigned

Status

()

Firefox
Build Config
REOPENED
12 years ago
7 years ago

People

(Reporter: basic, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.31 KB, patch
Brian Ryner (not reading)
: review+
Details | Diff | Splinter Review
(Reporter)

Description

12 years ago
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.
(Reporter)

Comment 1

12 years ago
Created attachment 169428 [details] [diff] [review]
patch
(Reporter)

Comment 2

12 years ago
Created attachment 169430 [details] [diff] [review]
patch 2

oops attached the wrong file
Attachment #169428 - Attachment is obsolete: true
Argh, you beat me to it! I've just done exactly this.
Attachment #169430 - Flags: superreview+
Attachment #169430 - Flags: review?(bryner)
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
Last Resolved: 12 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.
You need to log in before you can comment on or make changes to this bug.