Title: [259860] trunk
- Revision
- 259860
- Author
- [email protected]
- Date
- 2020-04-10 03:58:25 -0700 (Fri, 10 Apr 2020)
Log 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):
Modified Paths
Diff
Modified: trunk/ChangeLog (259859 => 259860)
--- trunk/ChangeLog 2020-04-10 10:50:35 UTC (rev 259859)
+++ trunk/ChangeLog 2020-04-10 10:58:25 UTC (rev 259860)
@@ -1,3 +1,14 @@
+2020-04-10 Philippe Normand <[email protected]>
+
+ [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.
+
2020-04-08 Ross Kirsling <[email protected]>
Remove ENABLE_INTL define
Modified: trunk/Source/cmake/WebKitCCache.cmake (259859 => 259860)
--- trunk/Source/cmake/WebKitCCache.cmake 2020-04-10 10:50:35 UTC (rev 259859)
+++ trunk/Source/cmake/WebKitCCache.cmake 2020-04-10 10:58:25 UTC (rev 259860)
@@ -26,9 +26,11 @@
endif ()
endif ()
-if ("$ENV{WEBKIT_USE_SCCACHE}" STREQUAL "YES")
+if (("$ENV{WEBKIT_USE_SCCACHE}" STREQUAL "1") OR DEFINED ENV{SCCACHE_REDIS} OR DEFINED ENV{SCCACHE_BUCKET}
+ OR DEFINED ENV{SCCACHE_MEMCACHED} OR DEFINED ENV{SCCACHE_GCS_BUCKET} OR DEFINED ENV{SCCACHE_AZURE_CONNECTION_STRING})
find_program(SCCACHE_FOUND sccache)
if (SCCACHE_FOUND)
+ message(STATUS "Enabling sccache as prefix for compiler.")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${SCCACHE_FOUND})
endif ()
endif ()
Modified: trunk/Tools/ChangeLog (259859 => 259860)
--- trunk/Tools/ChangeLog 2020-04-10 10:50:35 UTC (rev 259859)
+++ trunk/Tools/ChangeLog 2020-04-10 10:58:25 UTC (rev 259860)
@@ -1,3 +1,16 @@
+2020-04-10 Philippe Normand <[email protected]>
+
+ [Flatpak SDK] Improved sccache support
+ https://bugs.webkit.org/show_bug.cgi?id=210027
+
+ Reviewed by Žan Doberšek.
+
+ 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):
+
2020-04-10 Commit Queue <[email protected]>
Unreviewed, reverting r259818.
Modified: trunk/Tools/flatpak/flatpakutils.py (259859 => 259860)
--- trunk/Tools/flatpak/flatpakutils.py 2020-04-10 10:50:35 UTC (rev 259859)
+++ trunk/Tools/flatpak/flatpakutils.py 2020-04-10 10:58:25 UTC (rev 259860)
@@ -624,6 +624,7 @@
"GTK",
"ICECC",
"JSC",
+ "SCCACHE",
"WEBKIT",
"WEBKIT2",
"WPE",
@@ -662,10 +663,19 @@
if var_tokens[0] in env_var_prefixes_to_keep or envvar in env_vars_to_keep or var_tokens[-1] in env_var_suffixes_to_keep:
forwarded[envvar] = value
+ share_network_option = "--share=network"
+ remote_sccache_configs = set(["SCCACHE_REDIS", "SCCACHE_BUCKET", "SCCACHE_MEMCACHED",
+ "SCCACHE_GCS_BUCKET", "SCCACHE_AZURE_CONNECTION_STRING",
+ "WEBKIT_USE_SCCACHE"])
+ if remote_sccache_configs.intersection(set(os.environ.keys())):
+ _log.debug("Enabling network access for the remote sccache")
+ flatpak_command.append(share_network_option)
+
if self.use_icecream:
_log.debug('Enabling the icecream compiler')
- flatpak_command.extend(["--share=network",
- "--bind-mount=/var/run/icecc=/var/run/icecc"])
+ if share_network_option not in flatpak_command:
+ flatpak_command.append(share_network_option)
+ flatpak_command.append("--bind-mount=/var/run/icecc=/var/run/icecc")
n_cores = multiprocessing.cpu_count() * 3
_log.debug('Following icecream recommendation for the number of cores to use: %d' % n_cores)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes