Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6511e21704cb8062310091bf8a80729dd38e9981
      
https://github.com/WebKit/WebKit/commit/6511e21704cb8062310091bf8a80729dd38e9981
  Author: Carlos Alberto Lopez Perez <[email protected]>
  Date:   2025-12-18 (Thu, 18 Dec 2025)

  Changed paths:
    M Source/cmake/WebKitCompilerFlags.cmake
    M Tools/Scripts/browserperfdash-benchmark
    M Tools/Scripts/build-webkit
    A Tools/Scripts/container-sdk-rootdir-wrapper
    M Tools/Scripts/run-bindings-tests
    M Tools/Scripts/run-builtins-generator-tests
    M Tools/Scripts/run-css-property-code-generation-tests
    M Tools/Scripts/run-gtk-tests
    M Tools/Scripts/run-javascriptcore-tests
    M Tools/Scripts/run-minibrowser
    M Tools/Scripts/run-perf-tests
    M Tools/Scripts/run-qt-wpe-minibrowser
    M Tools/Scripts/run-webdriver
    M Tools/Scripts/run-webdriver-tests
    M Tools/Scripts/run-webkit-httpd
    M Tools/Scripts/run-webkit-tests
    M Tools/Scripts/run-wpe-tests
    M Tools/Scripts/test262/Runner.pm
    M Tools/Scripts/webkitdirs.pm
    A Tools/Scripts/webkitpy/port/linux_container_sdk_utils.py

  Log Message:
  -----------
  [Tools][WPE][GTK][SDK] Build webkit in a common directory at /sdk/webkit when 
using the SDK
https://bugs.webkit.org/show_bug.cgi?id=303645

Reviewed by Nikolas Zimmermann.

Since we moved out of flatpak SDK to the new Container SDK we miss the feature
that it had Flatpak of building webkit in /app/webkit, as that allowed reusing
remote caches (ccache, sccache) when developers have the webkit checkout in
different directories very easy.

For ccache I tried a workaround at 301772@main but that ended causing issues
with GDB and the paths to the source files. Also for sccache that workaround
is not possible, sccache does not support at all sharing caches if the build
path on disk changes.

So this patch introduces a wrapper that can create a symlink from /sdk/webkit
to the webkit source directory and that also can create a private mount
namespace where /sdk/webkit is bind-mounted to the WebKit source directory.

That private mount namespace is only visible to the pid group executed by the
wrapper, so there can be multiple webkit builds or tests running each one
with its own private view of the /sdk/webkit bind-mount without interfering
between them. This allow to build or test from different webkit checkout paths
and each one of those processes would have a different /sdk/webkit mount point.

The symlink is created to support any test runner or program that doesn't run
with this wrapper, for example when using GDB to debug, that way the paths 
inside
/sdk/webkit can be resolved automatically.

For the symlink is not possible to have different views, so in case of working
from two different checkouts the last directory from where webkit was built, or
from where the tests were executed would be the one resolved.

This is not perfect, but I think is good enough. For example, if you run GDB it
is likely that before invoking GDB you would have executed any of the scripts
that use this wrapper (build-webkit, run-webkit-tests, run-minibrowser, etc) so
then the symlink would point to the right checkoutdir.

* Source/cmake/WebKitCompilerFlags.cmake:
* Tools/Scripts/browserperfdash-benchmark:
* Tools/Scripts/build-webkit:
* Tools/Scripts/container-sdk-rootdir-wrapper: Added.
* Tools/Scripts/run-bindings-tests:
* Tools/Scripts/run-builtins-generator-tests:
* Tools/Scripts/run-css-property-code-generation-tests:
* Tools/Scripts/run-gtk-tests:
* Tools/Scripts/run-javascriptcore-tests:
* Tools/Scripts/run-minibrowser:
* Tools/Scripts/run-perf-tests:
* Tools/Scripts/run-qt-wpe-minibrowser:
* Tools/Scripts/run-webdriver:
* Tools/Scripts/run-webdriver-tests:
* Tools/Scripts/run-webkit-httpd:
* Tools/Scripts/run-webkit-tests:
* Tools/Scripts/run-wpe-tests:
* Tools/Scripts/test262/Runner.pm:
(setupEnvironment):
* Tools/Scripts/webkitdirs.pm:
(maybeUseContainerSDKRootDir):
* Tools/Scripts/webkitpy/port/linux_container_sdk_utils.py: Added.
(maybe_use_container_sdk_root_dir):

Canonical link: https://commits.webkit.org/304672@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to