Skip to content

Commit

Permalink
Bug 1882291 - Switch to stdarch_arm_neon_intrinsics feature on rust >…
Browse files Browse the repository at this point in the history
…=1.78.
  • Loading branch information
hawkeye116477 committed May 21, 2024
1 parent c8551b0 commit fef2e88
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions gfx/qcms/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ cmyk = []

[dependencies]
libc = {version = "0.2", optional = true }

[build-dependencies]
version_check = "0.9"
7 changes: 7 additions & 0 deletions gfx/qcms/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extern crate version_check as rustc;

fn main() {
if rustc::is_min_version("1.78.0").unwrap_or(false) {
println!("cargo:rustc-cfg=stdsimd_split");
}
}
6 changes: 4 additions & 2 deletions gfx/qcms/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
#![allow(non_upper_case_globals)]
// These are needed for the neon SIMD code and can be removed once the MSRV supports the
// instrinsics we use
#![cfg_attr(feature = "neon", feature(stdsimd))]
#![cfg_attr(all(stdsimd_split, target_arch = "arm", feature = "neon"), feature(stdarch_arm_neon_intrinsics))]
#![cfg_attr(all(stdsimd_split, target_arch = "arm", feature = "neon"), feature(stdarch_arm_feature_detection))]
#![cfg_attr(all(not(stdsimd_split), target_arch = "arm", feature = "neon"), feature(stdsimd))]
#![cfg_attr(
feature = "neon",
all(target_arch = "arm", feature = "neon"),
feature(arm_target_feature, raw_ref_op)
)]
Expand Down

0 comments on commit fef2e88

Please sign in to comment.