[Xcode] Add an experimental setting to build with ccache
https://bugs.webkit.org/show_bug.cgi?id=173875
Reviewed by Tim Horton.
Source/bmalloc:
* Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
Source/JavaScriptCore:
* Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
Source/ThirdParty/ANGLE:
* Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
Source/ThirdParty/libwebrtc:
* Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
Source/WebCore:
* Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
Source/WebCore/PAL:
* Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
Source/WebKit/mac:
* Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
Source/WebKit2:
* Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
Source/WTF:
* Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
Tools:
On systems that already have ccache(1) installed, this patch adds experimental support for
it to Xcode builds. It can be enabled with the WK_USE_CCACHE build setting.
When ccache is enabled, CC is overridden to invoke Tools/ccache/ccache-clang. This script
finds the "-isysroot" argument to determine the active SDK, uses xcrun(1) and the SDK to
find the toolchain from which to run clang, and then invokes ccache with the required
arguments.
ccache is invoked with CCACHE_SLOPPINESS="pch_defines,time_macros", which is required for
precompiled headers to work properly [1].
LDPLUSPLUS is overridden to invoke Tools/ccache/ccache-clang++. It behaves the same as
ccache-clang, except it tells ccache to execute clang++ instead of clang. This is important
during linking.
[1] https://ccache.samba.org/manual.html#_precompiled_headers
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
* MiniBrowser/Configurations/DebugRelease.xcconfig: Ditto.
* MobileMiniBrowser/Configurations/DebugRelease.xcconfig: Ditto.
* TestWebKitAPI/Configurations/DebugRelease.xcconfig: Ditto.
* WebKitTestRunner/Configurations/DebugRelease.xcconfig: Ditto.
* ccache/README.md: Added.
* ccache/ccache-clang: Added.
* ccache/ccache-clang++: Added.
* ccache/ccache.xcconfig: Added. Overrides CC and LDPLUSPLUS when WK_USE_CACHE=YES.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219082
268f45cc-cd09-0410-ab3c-
d52691b4dbfc