[Tools][WPE][GTK][SDK] Build webkit in a common directory at /sdk/webkit when using the SDK
6d39f9c3a5afb69504c7071f529188739630cfb6
[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 NOBODY (OOPS!). 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):
https://github.com/WebKit/WebKit/commit/6d39f9c3a5afb69504c7071f529188739630cfb6
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/3c47e6cec09cefe8abc8c275956287ff1a1bd011)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/0ea68143e14cbaab409df2b7a1143557d67bb985)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/5bcde540b65392599e35e69cd881c560fac97eed)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/45a1ece38eb5c31dc237c533b8d26cd43a91e485)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/1abacfcf5735588de332687a35a2cbaebb4f639a)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/0690fd111914d1901f79040fb4c401e2e7a7d6d3)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/11dc7b68f3a24e87a61de28d42f9000116b08292)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/20c530eb23ee57b90ff3fcada5aaeef75a6f21df)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/67d4c89ca180be7b42c8314df0cbd0268506478b)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/6d39f9c3a5afb69504c7071f529188739630cfb6)
EWS run on current version of this PR (hash https://github.com/WebKit/WebKit/commit/4679090d13303883e4d28180cf14b04f15c76884)
๐งช api-wpe