Bug 1727266 - Enable wasm sandboxing on 32-bits Linux and 32-bits Windows. r=firefox-build-system-reviewers,mhentges

Somehow, most 32-bits Linux builds already had a dependency on the wasi
sysroot.

However, don't enable wasm sandboxing for ogg just yet.

Differential Revision: https://phabricator.services.mozilla.com/D123426
This commit is contained in:
Mike Hommey 2021-09-29 03:58:46 +00:00
Родитель 151ad3eeb4
Коммит 949baa5525
4 изменённых файлов: 25 добавлений и 8 удалений

Просмотреть файл

@ -50,6 +50,7 @@ win32-mingwclang/opt:
- linux64-mingw-fxc2-x86
- linux64-dump_syms
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
win32-mingwclang/debug:
description: "Win32 MinGW-Clang Debug"
@ -86,6 +87,7 @@ win32-mingwclang/debug:
- linux64-mingw-fxc2-x86
- linux64-dump_syms
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
win64-mingwclang/opt:
description: "Win64 MinGW-Clang Opt"

Просмотреть файл

@ -61,6 +61,7 @@ win32/debug:
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
fetch:
- upx-3.95-win
@ -115,6 +116,7 @@ win32/opt:
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
fetch:
- upx-3.95-win
@ -492,6 +494,7 @@ win32-shippable/opt:
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
fetch:
- upx-3.95-win
@ -601,6 +604,7 @@ win32-add-on-devel/opt:
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
fetch:
- upx-3.95-win
@ -756,6 +760,7 @@ win32-noopt/debug:
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
fetch:
- upx-3.95-win
@ -801,6 +806,7 @@ win32-rusttests/opt:
- win64-winchecksec
- win64-mozmake
- win64-dump_syms
- sysroot-wasm32-wasi
optimization:
test-inclusive: [rusttests]
@ -846,6 +852,7 @@ win32-rusttests/debug:
- win64-winchecksec
- win64-mozmake
- win64-dump_syms
- sysroot-wasm32-wasi
optimization:
test-inclusive: [rusttests]
@ -1278,6 +1285,7 @@ win32-devedition/opt:
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
fetch:
- upx-3.95-win

Просмотреть файл

@ -67,6 +67,7 @@ jobs:
- linux64-node
- sysroot-i686-linux-gnu
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
linux64-shippable/opt:
description: "Linux64 Instrumented"
@ -262,6 +263,7 @@ jobs:
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
fetch:
- upx-3.95-win

Просмотреть файл

@ -2115,13 +2115,21 @@ def wasm_sandboxing_libraries():
@depends(dependable(wasm_sandboxing_libraries), target, "MOZ_AUTOMATION")
def default_wasm_sandboxing_libraries(libraries, target, automation):
non_default_libs = set()
if target.bitness == 32:
non_default_libs.add("ogg")
if automation and (
(target.kernel == "Linux" and target.os == "GNU" and target.cpu == "x86_64")
(
target.kernel == "Linux"
and target.os == "GNU"
and target.cpu in ("x86", "x86_64")
)
or (target.os == "Android" and target.bitness == 64)
or (target.kernel == "Darwin" and target.bitness == 64)
or (target.kernel == "WINNT" and target.bitness == 64)
or target.kernel == "WINNT"
):
return libraries
return tuple(l for l in libraries if l not in non_default_libs)
option(
@ -2238,14 +2246,11 @@ with only_when(requires_wasm_sandboxing & compile_environment):
set_config("WASM_CXXFLAGS", wasm_cxxflags)
@depends("--with-wasm-sandboxed-libraries", target)
def wasm_sandboxing(libraries, target):
@depends("--with-wasm-sandboxed-libraries")
def wasm_sandboxing(libraries):
if not libraries:
return
if target.bitness != 64:
die("wasm sandboxing is only supported on 64-bits platforms")
return namespace(**{name: True for name in libraries})