Title: [278600] trunk/Tools
- Revision
- 278600
- Author
- [email protected]
- Date
- 2021-06-08 03:31:16 -0700 (Tue, 08 Jun 2021)
Log Message
[Flatpak SDK] Allow custom build directories
https://bugs.webkit.org/show_bug.cgi?id=226142
Patch by Philippe Normand <[email protected]> on 2021-06-08
Reviewed by Adrian Perez de Castro.
By default the build directory remains WebKitBuild/{GTK,WPE}/{Release,Debug}. Builds done
with the Flatpak SDK now support the standard WEBKIT_OUTPUTDIR environment variable, eg.
setting $WEBKIT_OUTPUTDIR to "/path/to/somewhere", the built files will end up in
/path/to/somewhere/{GTK,WPE}/Release.
* flatpak/flatpakutils.py:
(WebkitFlatpak.clean_args):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (278599 => 278600)
--- trunk/Tools/ChangeLog 2021-06-08 09:27:20 UTC (rev 278599)
+++ trunk/Tools/ChangeLog 2021-06-08 10:31:16 UTC (rev 278600)
@@ -1,3 +1,18 @@
+2021-06-08 Philippe Normand <[email protected]>
+
+ [Flatpak SDK] Allow custom build directories
+ https://bugs.webkit.org/show_bug.cgi?id=226142
+
+ Reviewed by Adrian Perez de Castro.
+
+ By default the build directory remains WebKitBuild/{GTK,WPE}/{Release,Debug}. Builds done
+ with the Flatpak SDK now support the standard WEBKIT_OUTPUTDIR environment variable, eg.
+ setting $WEBKIT_OUTPUTDIR to "/path/to/somewhere", the built files will end up in
+ /path/to/somewhere/{GTK,WPE}/Release.
+
+ * flatpak/flatpakutils.py:
+ (WebkitFlatpak.clean_args):
+
2021-06-07 Jean-Yves Avenard <[email protected]>
Update jya's email address
Modified: trunk/Tools/flatpak/flatpakutils.py (278599 => 278600)
--- trunk/Tools/flatpak/flatpakutils.py 2021-06-08 09:27:20 UTC (rev 278599)
+++ trunk/Tools/flatpak/flatpakutils.py 2021-06-08 10:31:16 UTC (rev 278600)
@@ -569,11 +569,19 @@
if self.gdb is None and '--gdb' in sys.argv:
self.gdb = True
- self.build_root = os.path.join(self.source_root, 'WebKitBuild')
- self.build_path = os.path.join(self.build_root, self.platform, self.build_type)
+ base_build_dir = 'WebKitBuild'
+
+ # This path doesn't take $WEBKIT_OUTPUTDIR in account because the standalone toolchains
+ # paths depend on it and those are also hard-coded in the generated sccache config.
+ self.build_root = os.path.join(self.source_root, base_build_dir)
+
self.config_file = os.path.join(self.flatpak_build_path, 'webkit_flatpak_config.json')
self.sccache_config_file = os.path.join(self.flatpak_build_path, 'sccache.toml')
+ build_root = os.environ.get("WEBKIT_OUTPUTDIR", self.source_root)
+ self.build_path = os.path.join(build_root, base_build_dir, self.platform, self.build_type)
+ _log.debug("Building %s port in %s" % (self.platform, self.build_path))
+
self.toolchains_directory = os.path.join(self.build_root, "Toolchains")
if not os.path.isdir(self.toolchains_directory):
os.makedirs(self.toolchains_directory)
@@ -910,9 +918,12 @@
for envvar, value in sandbox_environment.items():
flatpak_command.append("--env=%s=%s" % (envvar, value))
+ # $WEBKIT_OUTPUTDIR is not forwarded in the build sandbox because the host build path is
+ # always bind-mounted to /app in the sandbox.
+ env_vars_to_drop = ("WEBKIT_OUTPUTDIR", "LANGUAGE")
flatpak_env = os.environ.copy()
for envvar in list(flatpak_env.keys()):
- if envvar.startswith("LC_") or envvar == "LANGUAGE":
+ if envvar.startswith("LC_") or envvar in env_vars_to_drop:
del flatpak_env[envvar]
if self.flatpak_version >= (1, 10, 0):
flatpak_command.append("--unset-env=%s" % envvar)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes