Bug 1495293 - Make enable-rust-simd a JS option so JS crates get built with the RUSTC_BOOTSTRAP=1 flag in automation. r=froydnj
☠☠ backed out by 2b4331c9d829 ☠ ☠
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 01 Oct 2018 21:15:27 -0400
changeset 494859 11df51f97f138ade3124881b9a72a3d5e65fabba
parent 494831 00de0dfa82f2fe4ddcd2f9cddde39862d8ee2763
child 494860 99b28f8874bb1ebd352f8cb16ebb6ca098f54133
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1495293
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 1495293 - Make enable-rust-simd a JS option so JS crates get built with the RUSTC_BOOTSTRAP=1 flag in automation. r=froydnj
build/moz.configure/rust.configure
toolkit/moz.configure
--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
@@ -347,8 +347,24 @@ def win64_cargo_linker_config(linker, en
         [target.x86_64-pc-windows-msvc]
         linker = "{objdir}/build/win64/cargo-linker.bat"
         '''.format(objdir=env.topobjdir))
     # We want an empty string here so we don't leave the @ variable in the config file.
     return ''
 
 
 set_config('WIN64_CARGO_LINKER_CONFIG', win64_cargo_linker_config)
+
+
+# SIMD acceleration for Rust code (currently just encoding_rs)
+
+js_option('--enable-rust-simd', env='MOZ_RUST_SIMD',
+          help='Enable explicit SIMD in Rust code.')
+
+@depends('--enable-rust-simd', target)
+def rust_simd(value, target):
+    # As of 2018-06-05, the simd crate only works on aarch64,
+    # armv7, x86 and x86_64.
+    if target.cpu in ('aarch64', 'arm', 'x86', 'x86_64') and value:
+        return True
+
+set_config('MOZ_RUST_SIMD', rust_simd)
+set_define('MOZ_RUST_SIMD', rust_simd)
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -643,31 +643,16 @@ def webrender(value):
         build = build_webrender,
         enable = enable_webrender,
     )
 
 set_config('MOZ_BUILD_WEBRENDER', webrender.build)
 set_define('MOZ_BUILD_WEBRENDER', webrender.build)
 set_config('MOZ_ENABLE_WEBRENDER', webrender.enable)
 
-# SIMD acceleration for Rust code (currently just encoding_rs)
-
-option('--enable-rust-simd', env='MOZ_RUST_SIMD',
-       help='Enable explicit SIMD in Rust code.')
-
-@depends('--enable-rust-simd', target)
-def rust_simd(value, target):
-    # As of 2018-06-05, the simd crate only works on aarch64,
-    # armv7, x86 and x86_64.
-    if target.cpu in ('aarch64', 'arm', 'x86', 'x86_64') and value:
-        return True
-
-set_config('MOZ_RUST_SIMD', rust_simd)
-set_define('MOZ_RUST_SIMD', rust_simd)
-
 # Printing
 # ==============================================================
 @depends(target)
 def ios_disable_printing(target):
     if target.os == 'iOS':
         return False
 
 imply_option('--enable-printing', ios_disable_printing, reason='--target')