Enable AArch64 processor feature detection unconditionally (#4034)

std::arch::is_aarch64_feature_detected!() is now part of stable
Rust, so we can always use it.

Copyright (c) 2022, Arm Limited.
This commit is contained in:
Anton Kirilov
2022-04-28 15:27:32 +01:00
committed by GitHub
parent b69fede72f
commit a1e4b4b521
4 changed files with 43 additions and 18 deletions

View File

@@ -105,8 +105,7 @@ pub fn builder_with_options(infer_native_flags: bool) -> Result<isa::Builder, &'
}
}
// `stdsimd` is necessary for std::is_aarch64_feature_detected!().
#[cfg(all(target_arch = "aarch64", feature = "stdsimd"))]
#[cfg(target_arch = "aarch64")]
{
use cranelift_codegen::settings::Configurable;
@@ -114,7 +113,7 @@ pub fn builder_with_options(infer_native_flags: bool) -> Result<isa::Builder, &'
return Ok(isa_builder);
}
if std::is_aarch64_feature_detected!("lse") {
if std::arch::is_aarch64_feature_detected!("lse") {
isa_builder.enable("has_lse").unwrap();
}
}