forked from microsoft/playwright
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
browser(firefox): use pre-downloaded toolchains for release builds
Firefox requires a bunch of build tools (aka "toolchains") to be built. Until recently, default MacOS clang (that comes with Xcode) was sufficient to compile firefox. However, Firefox 95 started to use WebAssembly. This yielded the following issues specific to MacOS (somehow builds complete successfully on other platforms): - Default MacOS clang that comes with XCode doesn't support WebAssembly: WebAssembly/wasi-sdk#172 (comment) - Clang that comes from Homebrew is missing `libclang_rt.builtins-wasm32.a`: https://github.com/jedisct1/libclang_rt.builtins-wasm32.a/blob/79b9b39f9be950110d3a7d6f91d86074349d8302/README.md - Firefox also requires `wasi sysroot` Now, depending on which branch firefox checkout comes from (`mozilla-release` vs `mozilla-beta`), firefox build system **might** or **might not** be able to download all the required toolchains in the `$HOME/.mozbuild` folder: - `mozilla-beta` branch supports toolchain auto-download - `mozilla-release` **does not** support it yet: https://bugzilla.mozilla.org/show_bug.cgi?id=1744197#c2 The recommended solution is to download toolchains using non-release firefox branch, and then re-use these toolchains to compile firefox from release branch. This patch does exactly this: relies on pre-downloaded toolchains for release firefox compilation. To re-use pre-downloaded toolchains, we set a combination of `MOZ_AUTOMATION` and `MOZ_FETCH_DIR` environment variables - this is the same approach that is used on the official Firefox CI (see `about:buildconfig` page in the stable firefox 95). This almost works, but there's a catch: the `MOZ_AUTOMATION` environment variable auto-adds ("implies") the `--enable-release` configuration option: https://github.com/mozilla/gecko-dev/blob/9e1cd985485c0e01c5faa9b5072a405b344ebde7/moz.configure#L162 The `--enable-release` is supposed to yield a better binary, and we want builds to be the same across platforms, so this patch adds this option **unconditionally on all platforms**. The `--enable-release` is also more picky about the source code: for example, it complains about unused return values. Browser changes in this patch are addressing these. References microsoft#10759
- Loading branch information
1 parent
66292a5
commit 6ea4480
Showing
6 changed files
with
51 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
1310 | ||
Changed: lushnikov@chromium.org Tue Dec 14 15:56:05 PST 2021 | ||
1311 | ||
Changed: lushnikov@chromium.org Tue Dec 14 23:27:53 PST 2021 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
1310 | ||
Changed: lushnikov@chromium.org Mon 13 Dec 2021 07:00:27 PM PST | ||
1311 | ||
Changed: lushnikov@chromium.org Tue Dec 14 23:26:10 PST 2021 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters