Bug 1261841 part 6 - Make --enable-rust-simd a no-op on CPU architectures other than aarch64, x86 and x86_64. r=froydnj.
MozReview-Commit-ID: JZ2iwvJXUB7
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -795,19 +795,22 @@ set_config('MOZ_BUILD_WEBRENDER', webren
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')
-def rust_simd(value):
- if value:
+@depends('--enable-rust-simd', target)
+def rust_simd(value, target):
+ # As of 2017-06-13, the simd crate only works on aarch64,
+ # x86 and x86_64. It's meant to work on 32-bit ARM, too,
+ # but currently does not.
+ if target.cpu in ('aarch64', 'x86', 'x86_64') and value:
return True
set_config('MOZ_RUST_SIMD', rust_simd)
set_define('MOZ_RUST_SIMD', rust_simd)
# Printing
# ==============================================================
@depends(target)