Changeset 223818 in webkit


Ignore:
Timestamp:
Oct 21, 2017 2:42:51 PM (7 years ago)
Author:
timothy_horton@apple.com
Message:

Turn on ccache for Mac cmake builds by default
https://bugs.webkit.org/show_bug.cgi?id=177059

Reviewed by Sam Weinig.

.:

  • Source/cmake/WebKitCCache.cmake: Added.
  • Source/cmake/WebKitCommon.cmake:

Turn on ccache for Mac CMake builds (Makefile and Ninja generators only)
if it's installed, making use of CMake's ability to wrap the compiler invocation.

Tools:

  • ccache/ccache-clang:
  • ccache/ccache-wrapper: Added.

Add a pass-through ccache wrapper to be used with CMake, in addition
to the existing faux-clang wrappers.

  • Scripts/build-webkit:

Add --use-ccache and --no-use-ccache option, which will define
WK_USE_CCACHE to YES or NO, respectively, which the underlying
build systems respect. We do not define WK_USE_CCACHE if the option
is not specified, because the underlying build systems have different
default values.

Location:
trunk
Files:
1 added
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r223779 r223818  
     12017-10-21  Tim Horton  <timothy_horton@apple.com>
     2
     3        Turn on ccache for Mac cmake builds by default
     4        https://bugs.webkit.org/show_bug.cgi?id=177059
     5
     6        Reviewed by Sam Weinig.
     7
     8        * Source/cmake/WebKitCCache.cmake: Added.
     9        * Source/cmake/WebKitCommon.cmake:
     10        Turn on ccache for Mac CMake builds (Makefile and Ninja generators only)
     11        if it's installed, making use of CMake's ability to wrap the compiler invocation.
     12
    1132017-10-20  Antoine Quint  <graouts@apple.com>
    214
  • trunk/Source/cmake/WebKitCommon.cmake

    r223621 r223818  
    5353    include(WebKitMacros)
    5454    include(WebKitFS)
     55    include(WebKitCCache)
    5556    include(WebKitCompilerFlags)
    5657    include(WebKitFeatures)
  • trunk/Tools/ChangeLog

    r223796 r223818  
     12017-10-21  Tim Horton  <timothy_horton@apple.com>
     2
     3        Turn on ccache for Mac cmake builds by default
     4        https://bugs.webkit.org/show_bug.cgi?id=177059
     5
     6        Reviewed by Sam Weinig.
     7
     8        * ccache/ccache-clang:
     9        * ccache/ccache-wrapper: Added.
     10        Add a pass-through ccache wrapper to be used with CMake, in addition
     11        to the existing faux-clang wrappers.
     12
     13        * Scripts/build-webkit:
     14        Add --use-ccache and --no-use-ccache option, which will define
     15        WK_USE_CCACHE to YES or NO, respectively, which the underlying
     16        build systems respect. We do not define WK_USE_CCACHE if the option
     17        is not specified, because the underlying build systems have different
     18        default values.
     19
    1202017-10-20  Aakash Jain  <aakash_jain@apple.com>
    221
  • trunk/Tools/Scripts/build-webkit

    r223454 r223818  
    6767my $archs32bit = 0;
    6868my $skipLibraryUpdate = 0;
     69my $useCCache = -1;
    6970
    7071my @features = getFeatureOptionList();
     
    121122  --skip-library-update             Skip the check to see if windows libraries are up to date
    122123
     124  --[no-]use-ccache                 Enable (or disable) CCache, if available
     125
    123126EOF
    124127
     
    137140    'analyze' => \$shouldRunStaticAnalyzer,
    138141    'default-cmake-features' => \$defaultCMakeFeatures,
    139     'skip-library-update' => \$skipLibraryUpdate
     142    'skip-library-update' => \$skipLibraryUpdate,
     143    'use-ccache!' => \$useCCache,
    140144);
    141145
     
    155159
    156160$ENV{'VERBOSE'} = 1 if $verbose;
     161
     162if ($useCCache == 1) {
     163    $ENV{'WK_USE_CCACHE'} = "YES";
     164} elsif ($useCCache == 0) {
     165    $ENV{'WK_USE_CCACHE'} = "NO";
     166}
    157167
    158168checkRequiredSystemConfig();
  • trunk/Tools/ccache/ccache-clang

    r219082 r223818  
    3535    position=$(($position + 1))
    3636done
    37 CCACHE_SLOPPINESS="pch_defines,time_macros" ccache $(xcrun -f -sdk "$sdk" "${_XCRUN_TOOL:-clang}") "$@"
     37$(dirname "$0")/ccache-wrapper $(xcrun -f -sdk "$sdk" "${_XCRUN_TOOL:-clang}") "$@"
  • trunk/Tools/ccache/ccache-wrapper

    r223813 r223818  
    2424# THE POSSIBILITY OF SUCH DAMAGE.
    2525
    26 position=1
    27 while [[ $position -le $# ]]; do
    28     case "${!position}" in
    29     -isysroot)
    30         position=$(($position + 1))
    31         sdk="${!position}"
    32         break
    33         ;;
    34     esac
    35     position=$(($position + 1))
    36 done
    37 CCACHE_SLOPPINESS="pch_defines,time_macros" ccache $(xcrun -f -sdk "$sdk" "${_XCRUN_TOOL:-clang}") "$@"
     26CCACHE_SLOPPINESS="pch_defines,time_macros" ccache "$@"
Note: See TracChangeset for help on using the changeset viewer.