Fix cfg guards

This commit is contained in:
Joe Richey
2019-06-14 12:42:25 -07:00
parent 5c6294ae7b
commit 25bd5a558b
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -190,7 +190,7 @@ mod_use!(cfg(target_os = "redox"), use_file);
mod_use!(cfg(target_os = "solaris"), solaris_illumos);
mod_use!(cfg(windows), windows);
mod_use!(cfg(target_env = "sgx"), rdrand);
mod_use!(cfg(target_os = "uefi"), rdrand);
mod_use!(cfg(all(target_arch = "x86_64", target_os = "uefi")), rdrand);
mod_use!(cfg(target_os = "wasi"), wasi);
mod_use!(
@@ -232,7 +232,7 @@ mod_use!(
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
target_os = "uefi",
all(target_arch = "x86_64", target_os = "uefi"),
target_env = "sgx",
windows,
all(
+1 -1
View File
@@ -31,7 +31,7 @@ unsafe fn rdrand() -> Result<[u8; WORD_SIZE], Error> {
Err(Error::UNKNOWN)
}
#[cfg(and(target_env = "sgx", not(target_feature = "rdrand")))]
#[cfg(all(target_env = "sgx", not(target_feature = "rdrand")))]
compile_error!("SGX targets must enable RDRAND to get randomness");
// TODO use is_x86_feature_detected!("rdrand") when that works in core. See: