Skip to content
Snippets Groups Projects
Commit 25bd5a55 authored by Joe Richey's avatar Joe Richey
Browse files

Fix cfg guards

parent 5c6294ae
No related branches found
No related tags found
No related merge requests found
......@@ -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(
......
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment