Title: [261551] trunk/Tools
Revision
261551
Author
[email protected]
Date
2020-05-12 03:51:03 -0700 (Tue, 12 May 2020)

Log Message

[Flatpak SDK] Include clang++ and g++ in toolchains
https://bugs.webkit.org/show_bug.cgi?id=211663

Patch by Philippe Normand <[email protected]> on 2020-05-12
Reviewed by Adrian Perez de Castro.

/usr/bin/clang++ wasn't included before. Also a small unrelated drive-by, white-list RUST
env vars, such as RUST_LOG, useful when debugging sccache.

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

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (261550 => 261551)


--- trunk/Tools/ChangeLog	2020-05-12 08:49:57 UTC (rev 261550)
+++ trunk/Tools/ChangeLog	2020-05-12 10:51:03 UTC (rev 261551)
@@ -1,3 +1,18 @@
+2020-05-12  Philippe Normand  <[email protected]>
+
+        [Flatpak SDK] Include clang++ and g++ in toolchains
+        https://bugs.webkit.org/show_bug.cgi?id=211663
+
+        Reviewed by Adrian Perez de Castro.
+
+        /usr/bin/clang++ wasn't included before. Also a small unrelated drive-by, white-list RUST
+        env vars, such as RUST_LOG, useful when debugging sccache.
+
+        * flatpak/flatpakutils.py:
+        (WebkitFlatpak.run_in_sandbox):
+        (WebkitFlatpak.main):
+        (WebkitFlatpak.setup_icecc):
+
 2020-05-11  Simon Fraser  <[email protected]>
 
         [ macOS ] scrollingcoordinator/mac/latching/scrolling-select-should-not-latch-mainframe.html is a flaky failure

Modified: trunk/Tools/flatpak/flatpakutils.py (261550 => 261551)


--- trunk/Tools/flatpak/flatpakutils.py	2020-05-12 08:49:57 UTC (rev 261550)
+++ trunk/Tools/flatpak/flatpakutils.py	2020-05-12 10:51:03 UTC (rev 261551)
@@ -716,6 +716,7 @@
             "GTK",
             "ICECC",
             "JSC",
+            "RUST",
             "SCCACHE",
             "WAYLAND",
             "WEBKIT",
@@ -829,8 +830,8 @@
 
         if regenerate_toolchains:
             self.icc_version = {}
-            self.setup_icecc("gcc")
-            self.setup_icecc("clang")
+            self.setup_icecc("gcc", "g++")
+            self.setup_icecc("clang", "clang++")
             self.save_config()
 
         return self.setup_dev_env()
@@ -852,10 +853,11 @@
             json_config = {'icecc_version': self.icc_version}
             json.dump(json_config, config)
 
-    def setup_icecc(self, name):
+    def setup_icecc(self, *compilers):
         with tempfile.NamedTemporaryFile() as tmpfile:
-            toolchain_path = "/usr/bin/%s" % name
-            self.run_in_sandbox('icecc', '--build-native', toolchain_path, stdout=tmpfile, cwd=self.source_root)
+            command = ['icecc', '--build-native']
+            command.extend(["/usr/bin/%s" % compiler for compiler in compilers])
+            self.run_in_sandbox(*command, stdout=tmpfile, cwd=self.source_root)
             tmpfile.flush()
             tmpfile.seek(0)
             icc_version_filename, = re.findall(br'.*creating (.*)', tmpfile.read())
@@ -862,9 +864,9 @@
             toolchains_directory = os.path.join(self.build_root, "Toolchains")
             if not os.path.isdir(toolchains_directory):
                 os.makedirs(toolchains_directory)
-            archive_filename = os.path.join(toolchains_directory, "webkit-sdk-%s-%s" % (name, icc_version_filename))
+            archive_filename = os.path.join(toolchains_directory, "webkit-sdk-%s-%s" % (compilers[0], icc_version_filename))
             os.rename(icc_version_filename, archive_filename)
-            self.icc_version[name] = archive_filename
+            self.icc_version[compilers[0]] = archive_filename
             Console.message("Created %s self-contained toolchain archive", archive_filename)
 
     def setup_dev_env(self):
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to