⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 259860 in webkit


Ignore:
Timestamp:
Apr 10, 2020, 3:58:25 AM (6 years ago)
Author:
Philippe Normand
Message:

[Flatpak SDK] Improved sccache support
https://bugs.webkit.org/show_bug.cgi?id=210027

Reviewed by Žan Doberšek.

.:

  • Source/cmake/WebKitCCache.cmake: Check for sccache if one of its

environment variables has been set as well, otherwise the local
disk cache would be used, if WEBKIT_USE_SCCACHE is set to 1.

Tools:

Whitelist SCCACHE environment variables into the sandbox and allow
network access when one of those has been set.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r259767 r259860  
     12020-04-10  Philippe Normand  <pnormand@igalia.com>
     2
     3        [Flatpak SDK] Improved sccache support
     4        https://bugs.webkit.org/show_bug.cgi?id=210027
     5
     6        Reviewed by Žan Doberšek.
     7
     8        * Source/cmake/WebKitCCache.cmake: Check for sccache if one of its
     9        environment variables has been set as well, otherwise the local
     10        disk cache would be used, if WEBKIT_USE_SCCACHE is set to 1.
     11
    1122020-04-08  Ross Kirsling  <ross.kirsling@sony.com>
    213
  • trunk/Source/cmake/WebKitCCache.cmake

    r258467 r259860  
    2727endif ()
    2828
    29 if ("$ENV{WEBKIT_USE_SCCACHE}" STREQUAL "YES")
     29if (("$ENV{WEBKIT_USE_SCCACHE}" STREQUAL "1") OR DEFINED ENV{SCCACHE_REDIS} OR DEFINED ENV{SCCACHE_BUCKET}
     30    OR DEFINED ENV{SCCACHE_MEMCACHED} OR DEFINED ENV{SCCACHE_GCS_BUCKET} OR DEFINED ENV{SCCACHE_AZURE_CONNECTION_STRING})
    3031    find_program(SCCACHE_FOUND sccache)
    3132    if (SCCACHE_FOUND)
     33        message(STATUS "Enabling sccache as prefix for compiler.")
    3234        set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${SCCACHE_FOUND})
    3335    endif ()
  • trunk/Tools/ChangeLog

    r259857 r259860  
     12020-04-10  Philippe Normand  <pnormand@igalia.com>
     2
     3        [Flatpak SDK] Improved sccache support
     4        https://bugs.webkit.org/show_bug.cgi?id=210027
     5
     6        Reviewed by Žan Doberšek.
     7
     8        Whitelist SCCACHE environment variables into the sandbox and allow
     9        network access when one of those has been set.
     10
     11        * flatpak/flatpakutils.py:
     12        (WebkitFlatpak.run_in_sandbox):
     13
    1142020-04-10  Commit Queue  <commit-queue@webkit.org>
    215
  • trunk/Tools/flatpak/flatpakutils.py

    r259456 r259860  
    625625            "ICECC",
    626626            "JSC",
     627            "SCCACHE",
    627628            "WEBKIT",
    628629            "WEBKIT2",
     
    663664                forwarded[envvar] = value
    664665
     666        share_network_option = "--share=network"
     667        remote_sccache_configs = set(["SCCACHE_REDIS", "SCCACHE_BUCKET", "SCCACHE_MEMCACHED",
     668                                      "SCCACHE_GCS_BUCKET", "SCCACHE_AZURE_CONNECTION_STRING",
     669                                      "WEBKIT_USE_SCCACHE"])
     670        if remote_sccache_configs.intersection(set(os.environ.keys())):
     671            _log.debug("Enabling network access for the remote sccache")
     672            flatpak_command.append(share_network_option)
     673
    665674        if self.use_icecream:
    666675            _log.debug('Enabling the icecream compiler')
    667             flatpak_command.extend(["--share=network",
    668                                     "--bind-mount=/var/run/icecc=/var/run/icecc"])
     676            if share_network_option not in flatpak_command:
     677                flatpak_command.append(share_network_option)
     678            flatpak_command.append("--bind-mount=/var/run/icecc=/var/run/icecc")
    669679
    670680            n_cores = multiprocessing.cpu_count() * 3
Note: See TracChangeset for help on using the changeset viewer.