зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1758021 - Get is_{arm,aarch64}_feature_detected from std::arch on rustc >= 1.60. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D140278
This commit is contained in:
Родитель
3f85a16731
Коммит
f7b39f73c2
|
@ -4120,6 +4120,7 @@ name = "qcms"
|
|||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"rustc_version",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
@ -20,3 +20,6 @@ cmyk = []
|
|||
|
||||
[dependencies]
|
||||
libc = {version = "0.2", optional = true }
|
||||
|
||||
[build-dependencies]
|
||||
rustc_version = "0.2"
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
use rustc_version::{version, Version};
|
||||
|
||||
fn main() {
|
||||
if cfg!(feature = "neon") && std::env::var_os("RUSTC_BOOTSTRAP").is_none() {
|
||||
// With Rust 1.50 and newer RUSTC_BOOTSTAP should
|
||||
|
@ -9,4 +11,7 @@ fn main() {
|
|||
if target.contains("neon") {
|
||||
println!("cargo:rustc-cfg=libcore_neon");
|
||||
}
|
||||
if version().unwrap() >= Version::parse("1.60.0-alpha").unwrap() {
|
||||
println!("cargo:rustc-cfg=std_arch");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,10 @@ mod gtest {
|
|||
transform_util::lut_inverse_interp16, Intent::Perceptual,
|
||||
};
|
||||
use libc::c_void;
|
||||
#[cfg(all(target_arch = "arm", std_arch))]
|
||||
use std::arch::is_arm_feature_detected;
|
||||
#[cfg(all(target_arch = "aarch64", std_arch))]
|
||||
use std::arch::is_aarch64_feature_detected;
|
||||
use std::ptr::null_mut;
|
||||
|
||||
#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
|
||||
|
|
|
@ -55,6 +55,10 @@ use crate::{
|
|||
|
||||
use std::sync::atomic::Ordering;
|
||||
use std::sync::Arc;
|
||||
#[cfg(all(target_arch = "arm", feature = "neon", std_arch))]
|
||||
use std::arch::is_arm_feature_detected;
|
||||
#[cfg(all(target_arch = "aarch64", feature = "neon", std_arch))]
|
||||
use std::arch::is_aarch64_feature_detected;
|
||||
|
||||
pub const PRECACHE_OUTPUT_SIZE: usize = 8192;
|
||||
pub const PRECACHE_OUTPUT_MAX: usize = PRECACHE_OUTPUT_SIZE - 1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче