Bug 1507100: Disable wasm GC when Cranelift is enabled; r=lth
authorBenjamin Bouvier <benj@benj.me>
Wed, 14 Nov 2018 11:53:24 +0100
changeset 503201 7069cf49cb20869b3705a94047b8f763001a4223
parent 503200 fc0bc3b27660a2dcf0be70ad2e2dabd400f307aa
child 503202 15a5a4be9a35e39d05a0995238ecc6d3a2163ec4
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslth
bugs1507100
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1507100: Disable wasm GC when Cranelift is enabled; r=lth This caused an early initialization failure in the main() function of the JS shell, which also caused a full leak warning, and a hard test failure (exit code was non-zero). This patches silently disables GC when Cranelift is enabled instead, which translates into soft test failures.
js/src/shell/js.cpp
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -10449,33 +10449,31 @@ SetContextOptions(JSContext* cx, const O
     enableNativeRegExp = !op.getBoolOption("no-native-regexp");
     enableWasmBaseline = !op.getBoolOption("no-wasm-baseline");
     enableWasmIon = !op.getBoolOption("no-wasm-ion");
 #ifdef ENABLE_WASM_CRANELIFT
     wasmForceCranelift = op.getBoolOption("wasm-force-cranelift");
 #endif
 #ifdef ENABLE_WASM_GC
     enableWasmGc = op.getBoolOption("wasm-gc");
+# ifdef ENABLE_WASM_CRANELIFT
+    if (enableWasmGc && wasmForceCranelift) {
+        fprintf(stderr, "Do not combine --wasm-gc and --wasm-force-cranelift, they are "
+                        "incompatible.\n");
+    }
+    enableWasmGc = enableWasmGc && !wasmForceCranelift;
+# endif
 #endif
     enableTestWasmAwaitTier2 = op.getBoolOption("test-wasm-await-tier2");
     enableAsyncStacks = !op.getBoolOption("no-async-stacks");
     enableStreams = !op.getBoolOption("no-streams");
 #ifdef ENABLE_BIGINT
     enableBigInt = !op.getBoolOption("no-bigint");
 #endif
 
-#if defined ENABLE_WASM_GC && defined ENABLE_WASM_CRANELIFT
-    // Note, once we remove --wasm-gc this test will no longer make any sense
-    // and we'll need a better solution.
-    if (enableWasmGc && wasmForceCranelift) {
-        fprintf(stderr, "Do not combine --wasm-gc and --wasm-force-cranelift, they are incompatible.\n");
-        return false;
-    }
-#endif
-
     JS::ContextOptionsRef(cx).setBaseline(enableBaseline)
                              .setIon(enableIon)
                              .setAsmJS(enableAsmJS)
                              .setWasm(enableWasm)
                              .setWasmBaseline(enableWasmBaseline)
                              .setWasmIon(enableWasmIon)
 #ifdef ENABLE_WASM_CRANELIFT
                              .setWasmForceCranelift(wasmForceCranelift)