mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1495293 - Make enable-rust-simd a JS option so JS crates get built with the RUSTC_BOOTSTRAP=1 flag in automation. r=froydnj
This commit is contained in:
parent
578ac09f67
commit
4e68a766db
@ -352,3 +352,19 @@ def win64_cargo_linker_config(linker, env):
|
||||
|
||||
|
||||
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)
|
||||
|
@ -648,21 +648,6 @@ 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)
|
||||
|
Loading…
Reference in New Issue
Block a user