Title: [268475] trunk/Tools
Revision
268475
Author
krol...@apple.com
Date
2020-10-14 11:03:36 -0700 (Wed, 14 Oct 2020)

Log Message

'make debug' fails on the repository root if ccache is installed on mac after r262147
https://bugs.webkit.org/show_bug.cgi?id=212469
<rdar://problem/70278783>

Reviewed by David Kilzer.

ccache is frequently installed in /usr/local/bin. However, when
running under XCBuild, $PATH does not include /usr/local/bin. This
leaves in a situation where the check for the existence of ccache in
Makefile.shared succeeds, but the use of ccache in ccache-wrapper
fails. To address this, look for ccache in a few well-known places
rather than just relying on $PATH. If it still can't be found, fall
back to compiling normally without ccache.

* ccache/ccache-wrapper:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (268474 => 268475)


--- trunk/Tools/ChangeLog	2020-10-14 17:56:12 UTC (rev 268474)
+++ trunk/Tools/ChangeLog	2020-10-14 18:03:36 UTC (rev 268475)
@@ -1,3 +1,21 @@
+2020-10-14  Keith Rollin  <krol...@apple.com>
+
+        'make debug' fails on the repository root if ccache is installed on mac after r262147
+        https://bugs.webkit.org/show_bug.cgi?id=212469
+        <rdar://problem/70278783>
+
+        Reviewed by David Kilzer.
+
+        ccache is frequently installed in /usr/local/bin. However, when
+        running under XCBuild, $PATH does not include /usr/local/bin. This
+        leaves in a situation where the check for the existence of ccache in
+        Makefile.shared succeeds, but the use of ccache in ccache-wrapper
+        fails. To address this, look for ccache in a few well-known places
+        rather than just relying on $PATH. If it still can't be found, fall
+        back to compiling normally without ccache.
+
+        * ccache/ccache-wrapper:
+
 2020-10-14  Sam Weinig  <wei...@apple.com>
 
         [Testing] Support configuring any preference from test headers for WebKitTestRunner

Modified: trunk/Tools/ccache/ccache-wrapper (268474 => 268475)


--- trunk/Tools/ccache/ccache-wrapper	2020-10-14 17:56:12 UTC (rev 268474)
+++ trunk/Tools/ccache/ccache-wrapper	2020-10-14 18:03:36 UTC (rev 268475)
@@ -23,4 +23,28 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 # THE POSSIBILITY OF SUCH DAMAGE.
 
-CCACHE_SLOPPINESS="pch_defines,time_macros" ccache "$@"
+try_one()
+{
+    [[ -x "$1" && ! -d "$1" ]] && { CCACHE="$1"; return 0; }
+    return 1
+}
+
+try()
+{
+    [[ -n "${CCACHE}" ]] && return 0
+    try_one "$1" || \
+    try_one "$1/ccache" || \
+    try_one "$1/bin/ccache"
+}
+
+try $(which ccache &> /dev/null)
+try /usr/local
+try /opt/brew
+try "${HOMEBREW_TEMP}/../brew"
+try "${HOMEBREW_TEMP}/../../brew"
+
+if [[ -n "${CCACHE}" ]]; then
+    CCACHE_SLOPPINESS="pch_defines,time_macros" "${CCACHE}" "$@"
+else
+    "$@"
+fi
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to