From a797b755b826c70357acaf95fbabaab8270fd953 Mon Sep 17 00:00:00 2001 From: Henri Sivonen Date: Fri, 1 Mar 2019 10:08:24 +0000 Subject: [PATCH] Bug 1531655 - Emit a configure error if rustc version >= 1.33 and --enable-rust-simd used. r=glandium Differential Revision: https://phabricator.services.mozilla.com/D21649 --HG-- extra : moz-landing-system : lando --- toolkit/moz.configure | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/toolkit/moz.configure b/toolkit/moz.configure index 9792348f7642..87a1a123f2fe 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure @@ -705,11 +705,14 @@ set_config('MOZ_ENABLE_WEBRENDER', webrender.enable) 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): +@depends('--enable-rust-simd', target, rustc_info) +def rust_simd(value, target, rustc_info): # 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: + if rustc_info and rustc_info.version >= Version('1.33.0'): + die('--enable-rust-simd does not work with Rust 1.33 or later. ' + 'See https://bugzilla.mozilla.org/show_bug.cgi?id=1521249 .') return True set_config('MOZ_RUST_SIMD', rust_simd)