Title: [272577] trunk/Tools
Revision
272577
Author
[email protected]
Date
2021-02-09 06:53:58 -0800 (Tue, 09 Feb 2021)

Log Message

Allow icecream toolchain override in flatpakutils
https://bugs.webkit.org/show_bug.cgi?id=221605

Patch by Daniel Kolesa <[email protected]> on 2021-02-09
Reviewed by Philippe Normand.

This allows the user to specify a custom icecream toolchain.
Usually you will not want to do this, but it is useful e.g. when
you have a machine in your cluster that does not have a compiler
in the SDK. You can either force the whole version string by using
ICECC_VERSION_OVERRIDE, or append to the original string with
ICECC_VERSION_APPEND.

* flatpak/flatpakutils.py:
(WebkitFlatpak.run_in_sandbox):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (272576 => 272577)


--- trunk/Tools/ChangeLog	2021-02-09 14:08:42 UTC (rev 272576)
+++ trunk/Tools/ChangeLog	2021-02-09 14:53:58 UTC (rev 272577)
@@ -1,3 +1,20 @@
+2021-02-09  Daniel Kolesa  <[email protected]>
+
+        Allow icecream toolchain override in flatpakutils
+        https://bugs.webkit.org/show_bug.cgi?id=221605
+
+        Reviewed by Philippe Normand.
+
+        This allows the user to specify a custom icecream toolchain.
+        Usually you will not want to do this, but it is useful e.g. when
+        you have a machine in your cluster that does not have a compiler
+        in the SDK. You can either force the whole version string by using
+        ICECC_VERSION_OVERRIDE, or append to the original string with
+        ICECC_VERSION_APPEND.
+
+        * flatpak/flatpakutils.py:
+        (WebkitFlatpak.run_in_sandbox):
+
 2021-02-09  Lauro Moura  <[email protected]>
 
         [GLIB] Geolocation API tests are flaky timeout instead of failure

Modified: trunk/Tools/flatpak/flatpakutils.py (272576 => 272577)


--- trunk/Tools/flatpak/flatpakutils.py	2021-02-09 14:08:42 UTC (rev 272576)
+++ trunk/Tools/flatpak/flatpakutils.py	2021-02-09 14:53:58 UTC (rev 272577)
@@ -830,12 +830,16 @@
             _log.debug('Following icecream recommendation for the number of cores to use: %d' % n_cores)
             toolchain_name = os.environ.get("CC", "gcc")
             try:
-                toolchain_path = self.icc_version[toolchain_name]
+                toolchain_path = os.environ.get("ICECC_VERSION_OVERRIDE", self.icc_version[toolchain_name])
             except KeyError:
                 Console.error_message("Toolchains configuration not found. Please run webkit-flatpak -r")
                 return 1
-            if not os.path.isfile(toolchain_path):
-                Console.error_message("%s is not a valid IceCC toolchain. Please run webkit-flatpak -r", toolchain_path)
+            if "ICECC_VERSION_APPEND" in os.environ:
+                toolchain_path += ","
+                toolchain_path += os.environ["ICECC_VERSION_APPEND"]
+            native_toolchain = toolchain_path.split(",")[0]
+            if not os.path.isfile(native_toolchain):
+                Console.error_message("%s is not a valid IceCC toolchain. Please run webkit-flatpak -r", native_toolchain)
                 return 1
             sandbox_environment.update({
                 "CCACHE_PREFIX": "icecc",
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to