Changeset 268475 in webkit


Ignore:
Timestamp:
Oct 14, 2020 11:03:36 AM (4 years ago)
Author:
Keith Rollin
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:
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r268474 r268475  
     12020-10-14  Keith Rollin  <krollin@apple.com>
     2
     3        'make debug' fails on the repository root if ccache is installed on mac after r262147
     4        https://bugs.webkit.org/show_bug.cgi?id=212469
     5        <rdar://problem/70278783>
     6
     7        Reviewed by David Kilzer.
     8
     9        ccache is frequently installed in /usr/local/bin. However, when
     10        running under XCBuild, $PATH does not include /usr/local/bin. This
     11        leaves in a situation where the check for the existence of ccache in
     12        Makefile.shared succeeds, but the use of ccache in ccache-wrapper
     13        fails. To address this, look for ccache in a few well-known places
     14        rather than just relying on $PATH. If it still can't be found, fall
     15        back to compiling normally without ccache.
     16
     17        * ccache/ccache-wrapper:
     18
    1192020-10-14  Sam Weinig  <weinig@apple.com>
    220
  • trunk/Tools/ccache/ccache-wrapper

    r226395 r268475  
    2424# THE POSSIBILITY OF SUCH DAMAGE.
    2525
    26 CCACHE_SLOPPINESS="pch_defines,time_macros" ccache "$@"
     26try_one()
     27{
     28    [[ -x "$1" && ! -d "$1" ]] && { CCACHE="$1"; return 0; }
     29    return 1
     30}
     31
     32try()
     33{
     34    [[ -n "${CCACHE}" ]] && return 0
     35    try_one "$1" || \
     36    try_one "$1/ccache" || \
     37    try_one "$1/bin/ccache"
     38}
     39
     40try $(which ccache &> /dev/null)
     41try /usr/local
     42try /opt/brew
     43try "${HOMEBREW_TEMP}/../brew"
     44try "${HOMEBREW_TEMP}/../../brew"
     45
     46if [[ -n "${CCACHE}" ]]; then
     47    CCACHE_SLOPPINESS="pch_defines,time_macros" "${CCACHE}" "$@"
     48else
     49    "$@"
     50fi
Note: See TracChangeset for help on using the changeset viewer.