Bug 1490948: Compile Cranelift on Nightlies except for Win32 static analysis builds; r=chmanchester
authorBenjamin Bouvier <benj@benj.me>
Tue, 25 Sep 2018 19:05:08 +0200
changeset 438680 4d9500ca5761edd678a109b6b5a4ac3f4aa5edb0
parent 438679 8c10309414ae573c04b690bc755859bfe8b99512
child 438681 2aec596947892a0c1aa78bba5e3a1d861140fde6
push id34733
push usertoros@mozilla.com
push dateFri, 28 Sep 2018 15:39:37 +0000
treeherdermozilla-central@156f9442db84 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1490948
milestone64.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 1490948: Compile Cranelift on Nightlies except for Win32 static analysis builds; r=chmanchester ... where LLVM (32-bits toolchain) runs out of memory when compiling gkrust.
js/moz.configure
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -480,18 +480,24 @@ def enable_build_binast(target, mileston
         return True
 
 set_define('JS_BUILD_BINAST', enable_build_binast)
 set_config('JS_BUILD_BINAST', enable_build_binast)
 
 
 # Experimental support for wasm code generation with Cranelift
 # ==============================================================
+
+@depends('--enable-clang-plugin', '--enable-release',
+         debug_rust, target, milestone.is_nightly, when='--enable-compile-environment')
+def default_cranelift(static_analysis, release, debug_rust, target, is_nightly):
+    # LLVM runs out of memory on win32 static analysis optimized builds when
+    # linking gkrust, so do not compile Cranelift there.
+    if static_analysis and target.kernel == 'WINNT' and target.cpu == 'x86' and release and not debug_rust:
+        return False
+    return is_nightly
+
 js_option('--enable-cranelift',
+          default=default_cranelift,
           help='Enable Cranelift code generator for wasm')
 
-@depends('--enable-cranelift')
-def enable_cranelift(value):
-    if value:
-        return True
-
-set_config('ENABLE_WASM_CRANELIFT', enable_cranelift)
-set_define('ENABLE_WASM_CRANELIFT', enable_cranelift)
+set_config('ENABLE_WASM_CRANELIFT', depends_if('--enable-cranelift')(lambda x: True))
+set_define('ENABLE_WASM_CRANELIFT', depends_if('--enable-cranelift')(lambda x: True))