Skip to content

Commit 73676e6

Browse files
committed
Bug 1882291. Switch to stdarch_arm_neon_intrinsics feature on rust >=1.78. r=glandium
We only need this on ARM32 because the ARM64 intrinsics are stable. stdarch_arm_neon_intrinsics was split out from stdsimd here: rust-lang/stdarch#1486 Differential Revision: https://phabricator.services.mozilla.com/D203039
1 parent 372b584 commit 73676e6

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

Diff for: Cargo.lock

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: gfx/qcms/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ cmyk = []
2020

2121
[dependencies]
2222
libc = {version = "0.2", optional = true }
23+
24+
[build-dependencies]
25+
version_check = "0.9"

Diff for: gfx/qcms/build.rs

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
extern crate version_check as rustc;
2+
3+
fn main() {
4+
if rustc::is_min_version("1.78.0").unwrap_or(false) {
5+
println!("cargo:rustc-cfg=stdsimd_split");
6+
}
7+
}

Diff for: gfx/qcms/src/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
#![allow(non_upper_case_globals)]
88
// These are needed for the neon SIMD code and can be removed once the MSRV supports the
99
// instrinsics we use
10-
#![cfg_attr(feature = "neon", feature(stdsimd))]
10+
#![cfg_attr(all(stdsimd_split, target_arch = "arm", feature = "neon"), feature(stdarch_arm_neon_intrinsics))]
11+
#![cfg_attr(all(stdsimd_split, target_arch = "arm", feature = "neon"), feature(stdarch_arm_feature_detection))]
12+
#![cfg_attr(all(not(stdsimd_split), target_arch = "arm", feature = "neon"), feature(stdsimd))]
1113
#![cfg_attr(
12-
feature = "neon",
14+
all(target_arch = "arm", feature = "neon"),
1315
feature(arm_target_feature, raw_ref_op)
1416
1517
)]

0 commit comments

Comments
 (0)