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

Changeset 278600 in webkit


Ignore:
Timestamp:
Jun 8, 2021, 3:31:16 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

[Flatpak SDK] Allow custom build directories
https://bugs.webkit.org/show_bug.cgi?id=226142

Patch by Philippe Normand <pnormand@igalia.com> 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):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r278592 r278600  
     12021-06-08  Philippe Normand  <pnormand@igalia.com>
     2
     3        [Flatpak SDK] Allow custom build directories
     4        https://bugs.webkit.org/show_bug.cgi?id=226142
     5
     6        Reviewed by Adrian Perez de Castro.
     7
     8        By default the build directory remains WebKitBuild/{GTK,WPE}/{Release,Debug}. Builds done
     9        with the Flatpak SDK now support the standard WEBKIT_OUTPUTDIR environment variable, eg.
     10        setting $WEBKIT_OUTPUTDIR to "/path/to/somewhere", the built files will end up in
     11        /path/to/somewhere/{GTK,WPE}/Release.
     12
     13        * flatpak/flatpakutils.py:
     14        (WebkitFlatpak.clean_args):
     15
    1162021-06-07  Jean-Yves Avenard  <jya@apple.com>
    217
  • trunk/Tools/flatpak/flatpakutils.py

    r275595 r278600  
    570570            self.gdb = True
    571571
    572         self.build_root = os.path.join(self.source_root, 'WebKitBuild')
    573         self.build_path = os.path.join(self.build_root, self.platform, self.build_type)
     572        base_build_dir = 'WebKitBuild'
     573
     574        # This path doesn't take $WEBKIT_OUTPUTDIR in account because the standalone toolchains
     575        # paths depend on it and those are also hard-coded in the generated sccache config.
     576        self.build_root = os.path.join(self.source_root, base_build_dir)
     577
    574578        self.config_file = os.path.join(self.flatpak_build_path, 'webkit_flatpak_config.json')
    575579        self.sccache_config_file = os.path.join(self.flatpak_build_path, 'sccache.toml')
     580
     581        build_root = os.environ.get("WEBKIT_OUTPUTDIR", self.source_root)
     582        self.build_path = os.path.join(build_root, base_build_dir, self.platform, self.build_type)
     583        _log.debug("Building %s port in %s" % (self.platform, self.build_path))
    576584
    577585        self.toolchains_directory = os.path.join(self.build_root, "Toolchains")
     
    911919            flatpak_command.append("--env=%s=%s" % (envvar, value))
    912920
     921        # $WEBKIT_OUTPUTDIR is not forwarded in the build sandbox because the host build path is
     922        # always bind-mounted to /app in the sandbox.
     923        env_vars_to_drop = ("WEBKIT_OUTPUTDIR", "LANGUAGE")
    913924        flatpak_env = os.environ.copy()
    914925        for envvar in list(flatpak_env.keys()):
    915             if envvar.startswith("LC_") or envvar == "LANGUAGE":
     926            if envvar.startswith("LC_") or envvar in env_vars_to_drop:
    916927                del flatpak_env[envvar]
    917928                if self.flatpak_version >= (1, 10, 0):
Note: See TracChangeset for help on using the changeset viewer.