Last Comment Bug 689157 - Add support for building with clcache/ccache on Windows
: Add support for building with clcache/ccache on Windows
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: All Windows 7
-- enhancement (vote)
: mozilla10
Assigned To: Teemu Mannermaa (:wicked)
: Gregory Szorc [:gps] (away until 2017-03-20)
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:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

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 | Splinter Review

Description User image 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 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 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 User image Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 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 User image :Ehsan Akhgari 2011-09-29 14:30:33 PDT

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 User image :Ehsan Akhgari 2011-09-29 15:49:00 PDT
Merged from inbound:

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