Changes between Version 1 and Version 2 of Sccache


Ignore:
Timestamp:
Aug 5, 2020 5:00:51 AM (4 years ago)
Author:
Philippe Normand
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Sccache

    v1 v2  
    1 [[PageOutline]]
    21
    3 = Building with sccache(-dist) =
    4 
    5 This documentation applies to the WPE and GTK ports. From the [https://github.com/mozilla/sccache sccache] homepage:
    6 
    7 Sccache is a ccache-like tool. It is used as a compiler wrapper and avoids compilation when possible, storing a cache in a remote storage using the Amazon Simple Cloud Storage Service (S3) API, the Google Cloud Storage (GCS) API, or Redis. It works as a client-server. The client spawns a server if one is not running already, and sends the wrapped command line as a request to the server, which then does the work and returns stdout/stderr for the job. The client-server model allows the server to be more efficient in its handling of the remote storage.
    8 
    9 Sccache can also be used with local storage instead of remote.
    10 
    11 == Using the Flatpak SDK ==
    12 
    13 First, generate a sccache config file. You will need an authentication token, specific to the scheduler you plan to use. By default the Igalia scheduler is used, unless you provide an override using the command-line: `-s sccache.example.com`
    14 
    15 {{{
    16 #!sh
    17 $ Tools/Scripts/webkit-flatpak -r -t <token>
    18 $ cat WebKitBuild/UserFlatpak/sccache.toml
    19 [dist]
    20 scheduler_url = "https://sccache.igalia.com"
    21 [[dist.toolchains]]
    22 compiler_executable = "/usr/bin/c++"
    23 archive_compiler_executable = "/usr/bin/g++"
    24 type = "path_override"
    25 archive = "/home/phil/WebKit/WebKitBuild/Toolchains/webkit-sdk-gcc-df05b4231b1586d4bc07430d8353065c.tar.gz"
    26 
    27 [[dist.toolchains]]
    28 compiler_executable = "/usr/bin/clang++"
    29 archive_compiler_executable = "/usr/bin/clang++"
    30 type = "path_override"
    31 archive = "/home/phil/WebKit/WebKitBuild/Toolchains/webkit-sdk-clang-1898673fc91e702aa44006e0195695a3.tar.gz"
    32 
    33 [dist.auth]
    34 token = "s3cr3t-tok3n"
    35 type = "token"
    36 }}}
    37 
    38 Then build WebKit. By default the generated config file will be used, unless you explicitly set the `SCCACHE_CONFIG` env var to an existing path.
    39 
    40 {{{
    41 #!sh
    42 $ export WEBKIT_USE_SCCACHE=1
    43 $ export NUMBER_OF_PROCESSORS=40
    44 $ Tools/Scripts/build-webkit --gtk
    45 }}}
    46 
    47 If you have access to a Redis instance, you can tell sccache to use it:
    48 
    49 {{{
    50 #!sh
    51 $ export SCCACHE_REDIS="redis://pass@host:port/dbpath"
    52 }}}
    53 
    54 == Using JHBuild ==
    55 
    56 You need to make sure you have a valid sccache config file and that sccache is installed on your build machine. Then use the same env vars as in the Flatpak SDK setup documented above.
     2Contents moved to https://trac.webkit.org/wiki/WebKitFlatpakSDK/SpeedUpBuild