Add support for building with clcache/ccache on Windows

RESOLVED FIXED in mozilla10

Status

()

Core
Build Config
--
enhancement
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: wicked, Assigned: wicked)

Tracking

Trunk
mozilla10
All
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 562428 [details] [diff] [review]
Fix CC variables used in "cl -showIncludes" detection logic, V1

It seems ccache is not supported on Windows w/MSVC compilers but there's a clcache.py replacement that could be used to speed the build. It's command line is ccache compatible but it's written in Python.

However, no matter how I tried to use it the current build system keeps failing at various stages during Configure. I tried to either use clcache.py as a cl replacement via cl.bat or direct python command line or as a preprocessor just like ccache. 

Eventually I got it working by compiling the Python code to an executable (using py2exe) and by patching few lines in the m-c build system. Patched problem would also prevent use of ccache on Windows too (maybe it's usable with gcc).

The attached patch removes the quotation around CC variable, which at this phase already has, if --with-ccache switch was used, the ccache command before cl. The quotes were probably here because a manually give cl command could contain path with spaces but there are other places where these are not used so a path with spaces would fail anyway.
Attachment #562428 - Flags: review?
Attachment #562428 - Flags: review? → review?(khuey)
Comment on attachment 562428 [details] [diff] [review]
Fix CC variables used in "cl -showIncludes" detection logic, V1

Review of attachment 562428 [details] [diff] [review]:
-----------------------------------------------------------------

Yeah, this should be fine.  If cl isn't on the PATH things are going to hell anyways.
Attachment #562428 - Flags: review?(khuey) → review+
(Assignee)

Updated

6 years ago
Keywords: checkin-needed
http://hg.mozilla.org/integration/mozilla-inbound/rev/65e060c81a59
Keywords: checkin-needed
Target Milestone: --- → mozilla10
https://hg.mozilla.org/mozilla-central/rev/27207582b5df

I accidentally pushed this patch to mozilla-central while it was living on inbound.  On the next merge, it will be merged.  Sorry for the mess!
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Merged from inbound: https://hg.mozilla.org/mozilla-central/rev/65e060c81a59

Updated

5 years ago
Blocks: 807066
You need to log in before you can comment on or make changes to this bug.