Last Comment Bug 689157 - Add support for building with clcache/ccache on Windows
: Add support for building with clcache/ccache on Windows
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: All Windows 7
: -- enhancement (vote)
: mozilla10
Assigned To: Teemu Mannermaa (:wicked)
:
Mentors:
http://github.com/frerich/clcache
Depends on:
Blocks: 807066
  Show dependency treegraph
 
Reported: 2011-09-26 08:02 PDT by Teemu Mannermaa (:wicked)
Modified: 2012-10-30 12:42 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Fix CC variables used in "cl -showIncludes" detection logic, V1 (1.93 KB, patch)
2011-09-26 08:02 PDT, Teemu Mannermaa (:wicked)
khuey: review+
Details | Diff | Review

Description Teemu Mannermaa (:wicked) 2011-09-26 08:02:05 PDT
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.
Comment 1 Kyle Huey [:khuey] (khuey@mozilla.com) 2011-09-26 08:26:33 PDT
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.
Comment 3 :Ehsan Akhgari (out sick) 2011-09-29 14:30:33 PDT
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!
Comment 4 :Ehsan Akhgari (out sick) 2011-09-29 15:49:00 PDT
Merged from inbound: https://hg.mozilla.org/mozilla-central/rev/65e060c81a59

Note You need to log in before you can comment on or make changes to this bug.