File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -11,12 +11,14 @@ diff --git a/src/stdarch/crates/core_arch/src/x86/cpuid.rs b/src/stdarch/crates/
11
11
index f313c42..ff952bc 100644
12
12
--- a/src/stdarch/crates/core_arch/src/x86/cpuid.rs
13
13
+++ b/src/stdarch/crates/core_arch/src/x86/cpuid.rs
14
- @@ -84,6 +84,9 @@ pub unsafe fn __cpuid(leaf: u32) -> CpuidResult {
14
+ @@ -84,6 +84,11 @@ pub unsafe fn __cpuid(leaf: u32) -> CpuidResult {
15
15
/// Does the host support the `cpuid` instruction?
16
16
#[inline]
17
17
pub fn has_cpuid() -> bool {
18
18
+ // __cpuid intrinsic is not yet implemented
19
- + return false;
19
+ + #[cfg(target_feature = "cg_clif")] {
20
+ + return false;
21
+ + }
20
22
+
21
23
#[cfg(target_env = "sgx")]
22
24
{
Original file line number Diff line number Diff line change @@ -188,18 +188,24 @@ impl CodegenBackend for CraneliftCodegenBackend {
188
188
// rustdoc needs to be able to document functions that use all the features, so
189
189
// whitelist them all
190
190
target_features_whitelist:: all_known_features ( )
191
+ . chain ( Some ( ( "cg_clif" , None ) ) )
191
192
. map ( |( a, b) | ( a. to_string ( ) , b) )
192
193
. collect ( )
193
194
} else {
194
195
target_features_whitelist:: target_feature_whitelist ( tcx. sess )
195
196
. iter ( )
197
+ . chain ( & Some ( ( "cg_clif" , None ) ) )
196
198
. map ( |& ( a, b) | ( a. to_string ( ) , b) )
197
199
. collect ( )
198
200
}
199
201
} ;
200
202
}
201
203
fn provide_extern ( & self , _providers : & mut Providers < ' _ > ) { }
202
204
205
+ fn target_features ( & self , _sess : & Session ) -> Vec < rustc_span:: Symbol > {
206
+ vec ! [ rustc_span:: Symbol :: intern( "cg_clif" ) ]
207
+ }
208
+
203
209
fn codegen_crate < ' tcx > (
204
210
& self ,
205
211
tcx : TyCtxt < ' tcx > ,
You can’t perform that action at this time.
0 commit comments