File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ mod_use!(cfg(target_os = "redox"), use_file);
190190mod_use ! ( cfg( target_os = "solaris" ) , solaris_illumos) ;
191191mod_use ! ( cfg( windows) , windows) ;
192192mod_use ! ( cfg( target_env = "sgx" ) , rdrand) ;
193- mod_use ! ( cfg( target_os = "uefi" ) , rdrand) ;
193+ mod_use ! ( cfg( all ( target_arch = "x86_64" , target_os = "uefi" ) ) , rdrand) ;
194194mod_use ! ( cfg( target_os = "wasi" ) , wasi) ;
195195
196196mod_use ! (
@@ -232,7 +232,7 @@ mod_use!(
232232 target_os = "openbsd" ,
233233 target_os = "redox" ,
234234 target_os = "solaris" ,
235- target_os = "uefi" ,
235+ all ( target_arch = "x86_64" , target_os = "uefi" ) ,
236236 target_env = "sgx" ,
237237 windows,
238238 all(
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ unsafe fn rdrand() -> Result<[u8; WORD_SIZE], Error> {
3131 Err ( Error :: UNKNOWN )
3232}
3333
34- #[ cfg( and ( target_env = "sgx" , not( target_feature = "rdrand" ) ) ) ]
34+ #[ cfg( all ( target_env = "sgx" , not( target_feature = "rdrand" ) ) ) ]
3535compile_error ! ( "SGX targets must enable RDRAND to get randomness" ) ;
3636
3737// TODO use is_x86_feature_detected!("rdrand") when that works in core. See:
You can’t perform that action at this time.
0 commit comments