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
+2017-07-03 Andy Estes <aestes@apple.com>
+
+ [Xcode] Add an experimental setting to build with ccache
+ https://bugs.webkit.org/show_bug.cgi?id=173875
+
+ Reviewed by Tim Horton.
+
+ * Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
+
2017-07-03 Devin Rousso <drousso@apple.com>
Web Inspector: Support listing WebGL2 and WebGPU contexts
SDKROOT = $(SDKROOT_$(USE_INTERNAL_SDK));
SDKROOT_ = macosx;
SDKROOT_YES = macosx.internal;
+
+WK_CCACHE_DIR = $(SRCROOT)/../../Tools/ccache;
+#include "../../../Tools/ccache/ccache.xcconfig"
+2017-07-03 Andy Estes <aestes@apple.com>
+
+ [Xcode] Add an experimental setting to build with ccache
+ https://bugs.webkit.org/show_bug.cgi?id=173875
+
+ Reviewed by Tim Horton.
+
+ * Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
+
2017-07-01 Dan Bernstein <mitz@apple.com>
[macOS] Remove code only needed when building for OS X Yosemite
SDKROOT = $(SDKROOT_$(USE_INTERNAL_SDK));
SDKROOT_ = macosx;
SDKROOT_YES = macosx.internal;
+
+WK_CCACHE_DIR = $(SRCROOT)/../../../Tools/ccache;
+#include "../../../../Tools/ccache/ccache.xcconfig"
+2017-07-03 Andy Estes <aestes@apple.com>
+
+ [Xcode] Add an experimental setting to build with ccache
+ https://bugs.webkit.org/show_bug.cgi?id=173875
+
+ Reviewed by Tim Horton.
+
+ * Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
+
2017-07-01 Dan Bernstein <mitz@apple.com>
[macOS] Remove code only needed when building for OS X Yosemite
SDKROOT_YES = macosx.internal;
WK_RELOCATABLE_FRAMEWORKS = YES;
+
+WK_CCACHE_DIR = $(SRCROOT)/../../../Tools/ccache;
+#include "../../../../Tools/ccache/ccache.xcconfig"
+2017-07-03 Andy Estes <aestes@apple.com>
+
+ [Xcode] Add an experimental setting to build with ccache
+ https://bugs.webkit.org/show_bug.cgi?id=173875
+
+ Reviewed by Tim Horton.
+
+ * Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
+
2017-07-03 Daewoong Jang <daewoong.jang@navercorp.com>
Remove an unused function export
SDKROOT = $(SDKROOT_$(USE_INTERNAL_SDK));
SDKROOT_ = macosx;
SDKROOT_YES = macosx.internal;
+
+WK_CCACHE_DIR = $(SRCROOT)/../../Tools/ccache;
+#include "../../../Tools/ccache/ccache.xcconfig"
+2017-07-03 Andy Estes <aestes@apple.com>
+
+ [Xcode] Add an experimental setting to build with ccache
+ https://bugs.webkit.org/show_bug.cgi?id=173875
+
+ Reviewed by Tim Horton.
+
+ * Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
+
2017-07-02 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r218910): Crash inside textMarkerDataForFirstPositionInTextControl
SDKROOT_YES = macosx.internal;
WK_RELOCATABLE_FRAMEWORKS = YES;
+
+WK_CCACHE_DIR = $(SRCROOT)/../../Tools/ccache;
+#include "../../../Tools/ccache/ccache.xcconfig"
+2017-07-03 Andy Estes <aestes@apple.com>
+
+ [Xcode] Add an experimental setting to build with ccache
+ https://bugs.webkit.org/show_bug.cgi?id=173875
+
+ Reviewed by Tim Horton.
+
+ * Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
+
2017-07-03 Zan Dobersek <zdobersek@igalia.com>
[GCrypt] Implement CryptoKeyEC SPKI exports
SDKROOT = $(SDKROOT_$(USE_INTERNAL_SDK));
SDKROOT_ = macosx;
SDKROOT_YES = macosx.internal;
+
+WK_CCACHE_DIR = $(SRCROOT)/../../../Tools/ccache;
+#include "../../../../Tools/ccache/ccache.xcconfig"
+2017-07-03 Andy Estes <aestes@apple.com>
+
+ [Xcode] Add an experimental setting to build with ccache
+ https://bugs.webkit.org/show_bug.cgi?id=173875
+
+ Reviewed by Tim Horton.
+
+ * Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
+
2017-07-03 Tim Horton <timothy_horton@apple.com>
Expose WebPreferences for viewport-fit and constant() properties
SDKROOT = $(SDKROOT_$(USE_INTERNAL_SDK));
SDKROOT_ = macosx;
SDKROOT_YES = macosx.internal;
+
+WK_CCACHE_DIR = $(SRCROOT)/../../Tools/ccache;
+#include "../../../../Tools/ccache/ccache.xcconfig"
+2017-07-03 Andy Estes <aestes@apple.com>
+
+ [Xcode] Add an experimental setting to build with ccache
+ https://bugs.webkit.org/show_bug.cgi?id=173875
+
+ Reviewed by Tim Horton.
+
+ * Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
+
2017-07-03 Chris Dumez <cdumez@apple.com>
Drop ResourceLoadStatisticsStore's statisticsLock
WK_WEBCONTENT_SERVICE_NEEDS_XPC_DOMAIN_EXTENSION_ENTITLEMENT = NO;
WK_WEBCONTENT_SERVICE_NEEDS_VERSIONED_FRAMEWORK_PATH_LDFLAG[sdk=macosx*] = YES;
+
+WK_CCACHE_DIR = $(SRCROOT)/../../Tools/ccache;
+#include "../../../Tools/ccache/ccache.xcconfig"
+2017-07-03 Andy Estes <aestes@apple.com>
+
+ [Xcode] Add an experimental setting to build with ccache
+ https://bugs.webkit.org/show_bug.cgi?id=173875
+
+ Reviewed by Tim Horton.
+
+ * Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
+
2017-07-01 Dan Bernstein <mitz@apple.com>
[iOS] Remove code only needed when building for iOS 9.x
SDKROOT = $(SDKROOT_$(USE_INTERNAL_SDK));
SDKROOT_ = macosx;
SDKROOT_YES = macosx.internal;
+
+WK_CCACHE_DIR = $(SRCROOT)/../../Tools/ccache;
+#include "../../../Tools/ccache/ccache.xcconfig"
+2017-07-03 Andy Estes <aestes@apple.com>
+
+ [Xcode] Add an experimental setting to build with ccache
+ https://bugs.webkit.org/show_bug.cgi?id=173875
+
+ Reviewed by Tim Horton.
+
+ 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.
+
2017-07-03 Alex Christensen <achristensen@webkit.org>
REGRESSION(r215096) Queries of URLs with non-special schemes should not percent-encode single quotes
SDKROOT = $(SDKROOT_$(USE_INTERNAL_SDK));
SDKROOT_ = macosx;
SDKROOT_YES = macosx.internal;
+
+WK_CCACHE_DIR = $(SRCROOT)/../ccache;
+#include "../../../ccache/ccache.xcconfig"
SDKROOT = $(SDKROOT_$(USE_INTERNAL_SDK));
SDKROOT_ = macosx;
SDKROOT_YES = macosx.internal;
+
+WK_CCACHE_DIR = $(SRCROOT)/../ccache;
+#include "../../ccache/ccache.xcconfig"
ONLY_ACTIVE_ARCH = YES;
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
+
+WK_CCACHE_DIR = $(SRCROOT)/../ccache;
+#include "../../ccache/ccache.xcconfig"
SDKROOT_YES = macosx.internal;
OTHER_CPLUSPLUSFLAGS = $(inherited) -ftemplate-depth=256;
+
+WK_CCACHE_DIR = $(SRCROOT)/../ccache;
+#include "../../ccache/ccache.xcconfig"
SDKROOT = $(SDKROOT_$(USE_INTERNAL_SDK));
SDKROOT_ = macosx;
SDKROOT_YES = macosx.internal;
+
+WK_CCACHE_DIR = $(SRCROOT)/../ccache;
+#include "../../ccache/ccache.xcconfig"
--- /dev/null
+# Prerequisites
+
+- Xcode
+- ```ccache(1)``` installed in /usr/local/bin
+
+# Configuring ccache
+
+The maximum cache size is 5GB by default, but a WebKit Debug build can require 20GB or more:
+
+- ```ccache --max-size=20G```
+
+# Building with ccache
+
+- ```make ARGS="WK_USE_CCACHE=YES"```
+- ```build-webkit WK_USE_CCACHE=YES```
+- Build in the Xcode UI by adding ```WK_USE_CCACHE = YES;``` to Tools/ccache/ccache.xcconfig (FIXME: this dirties the working directory).
+
+# Viewing cache statistics
+
+- ```ccache -s```
--- /dev/null
+#!/bin/bash
+
+# Copyright (C) 2017 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+# THE POSSIBILITY OF SUCH DAMAGE.
+
+position=1
+while [[ $position -le $# ]]; do
+ case "${!position}" in
+ -isysroot)
+ position=$(($position + 1))
+ sdk="${!position}"
+ break
+ ;;
+ esac
+ position=$(($position + 1))
+done
+CCACHE_SLOPPINESS="pch_defines,time_macros" ccache $(xcrun -f -sdk "$sdk" "${_XCRUN_TOOL:-clang}") "$@"
--- /dev/null
+#!/bin/bash
+
+# Copyright (C) 2017 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+# THE POSSIBILITY OF SUCH DAMAGE.
+
+_XCRUN_TOOL="clang++" $(dirname "$0")/ccache-clang "$@"
--- /dev/null
+// Copyright (C) 2017 Apple Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+// THE POSSIBILITY OF SUCH DAMAGE.
+
+CC = $(CC_$(WK_USE_CCACHE));
+CC_YES = $(WK_CCACHE_DIR)/ccache-clang;
+CC_NO = $(CC);
+CC_ = $(CC_NO);
+
+LDPLUSPLUS = $(LDPLUSPLUS_$(WK_USE_CCACHE));
+LDPLUSPLUS_YES = $(WK_CCACHE_DIR)/ccache-clang++;
+LDPLUSPLUS_NO = $(LDPLUSPLUS);
+LDPLUSPLUS_ = $(LDPLUSPLUS_NO);