Introduce #[cfg(target_feature = "cg_clif")]
This commit is contained in:
parent
392348d3d1
commit
431cebdca1
@ -11,12 +11,14 @@ diff --git a/src/stdarch/crates/core_arch/src/x86/cpuid.rs b/src/stdarch/crates/
|
||||
index f313c42..ff952bc 100644
|
||||
--- a/src/stdarch/crates/core_arch/src/x86/cpuid.rs
|
||||
+++ b/src/stdarch/crates/core_arch/src/x86/cpuid.rs
|
||||
@@ -84,6 +84,9 @@ pub unsafe fn __cpuid(leaf: u32) -> CpuidResult {
|
||||
@@ -84,6 +84,11 @@ pub unsafe fn __cpuid(leaf: u32) -> CpuidResult {
|
||||
/// Does the host support the `cpuid` instruction?
|
||||
#[inline]
|
||||
pub fn has_cpuid() -> bool {
|
||||
+ // __cpuid intrinsic is not yet implemented
|
||||
+ return false;
|
||||
+ #[cfg(target_feature = "cg_clif")] {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
#[cfg(target_env = "sgx")]
|
||||
{
|
||||
|
@ -188,11 +188,13 @@ impl CodegenBackend for CraneliftCodegenBackend {
|
||||
// rustdoc needs to be able to document functions that use all the features, so
|
||||
// whitelist them all
|
||||
target_features_whitelist::all_known_features()
|
||||
.chain(Some(("cg_clif", None)))
|
||||
.map(|(a, b)| (a.to_string(), b))
|
||||
.collect()
|
||||
} else {
|
||||
target_features_whitelist::target_feature_whitelist(tcx.sess)
|
||||
.iter()
|
||||
.chain(&Some(("cg_clif", None)))
|
||||
.map(|&(a, b)| (a.to_string(), b))
|
||||
.collect()
|
||||
}
|
||||
@ -200,6 +202,10 @@ impl CodegenBackend for CraneliftCodegenBackend {
|
||||
}
|
||||
fn provide_extern(&self, _providers: &mut Providers<'_>) {}
|
||||
|
||||
fn target_features(&self, _sess: &Session) -> Vec<rustc_span::Symbol> {
|
||||
vec![rustc_span::Symbol::intern("cg_clif")]
|
||||
}
|
||||
|
||||
fn codegen_crate<'tcx>(
|
||||
&self,
|
||||
tcx: TyCtxt<'tcx>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user