rust/library/stdarch/tests/cpu-detection.rs
Alex Crichton 922345c005 Use workspaces and fix tests
* Enable a Cargo workspace for the repo
* Disable tests for proc-macro crates
* Move back to mounting source directory read-only
* Refactor test invocation to only test one crate with `--all`
2017-11-22 13:42:58 +01:00

23 lines
699 B
Rust

#![feature(cfg_target_feature)]
#![cfg_attr(feature = "strict", deny(warnings))]
#![cfg_attr(feature = "cargo-clippy", allow(option_unwrap_used))]
#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
#[macro_use]
extern crate stdsimd;
#[test]
#[cfg(all(target_arch = "arm", target_os = "linux"))]
fn arm_linux() {
println!("neon: {}", cfg_feature_enabled!("neon"));
println!("pmull: {}", cfg_feature_enabled!("pmull"));
}
#[test]
#[cfg(all(target_arch = "aarch64", target_os = "linux"))]
fn aarch64_linux() {
println!("neon: {}", cfg_feature_enabled!("neon"));
println!("asimd: {}", cfg_feature_enabled!("asimd"));
println!("pmull: {}", cfg_feature_enabled!("pmull"));
}