Bug 1809206 - wasm: Add wasm-no-experimental config and try job. r=tcampbell

This commit adds a config flag '--wasm-no-experimental' which disables all
experimental features that have a conditional compile flag. This flag has
a higher precedence than the manual enable flags such as '--enable-wasm-gc'.

This commit then also adds a try task to run with this configuration on
linux64debug. It also runs jit-tests to cover all the wasm tests, but the
important thing is testing that the build succeeds.

Differential Revision: https://phabricator.services.mozilla.com/D166375
This commit is contained in:
Ryan Hunt 2023-02-17 00:11:38 +00:00
parent 3b2c7272b9
commit 6f268421b8
6 changed files with 96 additions and 28 deletions

View File

@ -641,6 +641,15 @@ set_define(
"WASM_CODEGEN_DEBUG", depends_if("--enable-wasm-codegen-debug")(lambda x: True)
)
# WebAssembly feature flags
# ==================================================
option(
"--wasm-no-experimental",
default=False,
help="Force disable all wasm experimental features for testing.",
)
# Support for WebAssembly function-references.
# ===========================
@ -658,8 +667,11 @@ option(
)
@depends("--enable-wasm-function-references")
def wasm_function_references(value):
@depends("--enable-wasm-function-references", "--wasm-no-experimental")
def wasm_function_references(value, no_experimental):
if no_experimental:
return
if value:
return True
@ -682,9 +694,11 @@ option(
)
@depends("--enable-wasm-gc", "--enable-wasm-function-references")
def wasm_gc(value, function_references):
if not value:
@depends(
"--enable-wasm-gc", "--enable-wasm-function-references", "--wasm-no-experimental"
)
def wasm_gc(value, function_references, no_experimental):
if no_experimental or not value:
return
if function_references:
@ -733,8 +747,11 @@ option(
)
@depends("--enable-wasm-extended-const")
def wasm_extended_const(value):
@depends("--enable-wasm-extended-const", "--wasm-no-experimental")
def wasm_extended_const(value, no_experimental):
if no_experimental:
return
if value:
return True
@ -770,9 +787,10 @@ option(
"--enable-jit",
"--enable-simulator",
target,
"--wasm-no-experimental",
)
def wasm_simd(value, jit_enabled, simulator, target):
if not value:
def wasm_simd(value, jit_enabled, simulator, target, no_experimental):
if no_experimental or not value:
return
if not jit_enabled:
@ -797,8 +815,16 @@ set_define("ENABLE_WASM_SIMD", wasm_simd)
# =====================================================================
@depends(target, c_compiler, moz_debug, milestone)
def wasm_verify_serialization_for_size(target, c_compiler, debug, milestone):
@depends(
target,
c_compiler,
moz_debug,
milestone,
"--wasm-no-experimental",
)
def wasm_verify_serialization_for_size(
target, c_compiler, debug, milestone, no_experimental
):
if (
debug == True
and target.kernel == "Linux"
@ -806,6 +832,7 @@ def wasm_verify_serialization_for_size(target, c_compiler, debug, milestone):
and c_compiler
and c_compiler.type == "clang"
and milestone.is_nightly
and not no_experimental
):
return True
return
@ -841,9 +868,15 @@ option(
)
@depends("--enable-wasm-avx", "--enable-wasm-simd", "--enable-simulator", target)
def wasm_avx(value, wasm_simd_enabled, simulator, target):
if not value:
@depends(
"--enable-wasm-avx",
"--enable-wasm-simd",
"--enable-simulator",
target,
"--wasm-no-experimental",
)
def wasm_avx(value, wasm_simd_enabled, simulator, target, no_experimental):
if no_experimental or not value:
return
if not wasm_simd_enabled:
@ -878,9 +911,9 @@ option(
)
@depends("--enable-wasm-relaxed-simd", "--enable-wasm-simd")
def wasm_relaxed_simd(value, wasm_simd):
if not value:
@depends("--enable-wasm-relaxed-simd", "--enable-wasm-simd", "--wasm-no-experimental")
def wasm_relaxed_simd(value, wasm_simd, no_experimental):
if no_experimental or not value:
return
if not wasm_simd:
@ -909,8 +942,11 @@ option(
)
@depends("--enable-wasm-moz-intgemm", target)
def wasm_moz_intgemm(value, target):
@depends("--enable-wasm-moz-intgemm", target, "--wasm-no-experimental")
def wasm_moz_intgemm(value, target, no_experimental):
if no_experimental:
return
if value and target.cpu in ("x86", "x86_64"):
return True
@ -941,9 +977,11 @@ option(
)
@depends("--enable-wasm-memory64", "--enable-simulator", target)
def wasm_memory64(value, simulator, target):
if not value:
@depends(
"--enable-wasm-memory64", "--enable-simulator", target, "--wasm-no-experimental"
)
def wasm_memory64(value, simulator, target, no_experimental):
if no_experimental or not value:
return
if target.cpu == "mips32":
@ -976,9 +1014,9 @@ option(
)
@depends("--enable-wasm-memory-control")
def wasm_memory_control(value):
if not value:
@depends("--enable-wasm-memory-control", "--wasm-no-experimental")
def wasm_memory_control(value, no_experimental):
if no_experimental or not value:
return
return True

View File

@ -0,0 +1,7 @@
{
"configure-args": "--wasm-no-experimental",
"debug": true,
"skip-tests": {
"all": ["jstests", "jsapitests"]
}
}

View File

@ -1,4 +1,4 @@
// |jit-test| skip-if: wasmCompileMode() != "ion" || (!getBuildConfiguration().x86 && !getBuildConfiguration().x64) || getBuildConfiguration().simulator
// |jit-test| skip-if: !wasmSimdEnabled() || wasmCompileMode() != "ion" || (!getBuildConfiguration().x86 && !getBuildConfiguration().x64) || getBuildConfiguration().simulator
const avx = isAvxPresent();
for (let [n1, n2, numInstr] of [

View File

@ -1 +1 @@
|jit-test| --wasm-moz-intgemm; skip-if: (!getBuildConfiguration().x64 && !getBuildConfiguration().x86) || getBuildConfiguration().simulator || getBuildConfiguration().release_or_beta
|jit-test| --wasm-moz-intgemm; skip-if: (!getBuildConfiguration().x64 && !getBuildConfiguration().x86) || getBuildConfiguration().simulator || !wasmMozIntGemmEnabled()

View File

@ -558,7 +558,7 @@ if CONFIG["CC_TYPE"] == "clang":
# Bug 1722102 - This should never be enabled in Release without explicit
# security and SpiderMonkey review.
# See https://bugzilla.mozilla.org/show_bug.cgi?id=1722102#c16
if CONFIG["NIGHTLY_BUILD"] and CONFIG["INTEL_ARCHITECTURE"]:
if CONFIG["ENABLE_WASM_MOZ_INTGEMM"]:
DIRS += ["intgemm"]
if CONFIG["JS_JITSPEW"]:

View File

@ -314,6 +314,29 @@ sm-linux64-wasi/opt:
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
sm-wasm-no-experimental-linux64/debug:
description: "Spidermonkey WebAssembly No experimental features"
index:
job-name: sm-wasm-no-experimental-linux64-debug
treeherder:
platform: linux64/debug
symbol: SM(wasm-no-experimental)
tier: 2
run:
spidermonkey-variant: wasm-noexperimental
fetches:
toolchain:
- linux64-clang
- linux64-cbindgen
- linux64-dump_syms
- linux64-breakpad-injector
- linux64-minidump-stackwalk
- linux64-llvm-symbolizer
- linux64-rust
- linux64-gcc
- linux64-pkgconf
- sysroot-x86_64-linux-gnu
sm-msan-linux64/opt:
description: "Spidermonkey Memory Sanitizer"
index: