Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpuid-bool/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## 0.1.0 (2020-07-14)
### Fixed
- SGX target support ([#67])
- SGX target support ([#68])

[#67]: https://github.com/RustCrypto/utils/pull/67
[#68]: https://github.com/RustCrypto/utils/pull/68

## 0.1.0 (2020-06-11)
- Initial release
4 changes: 3 additions & 1 deletion cpuid-bool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ expand_check_macro! {
macro_rules! cpuid_bool {
($($tf:tt),+ $(,)? ) => {{
// CPUID is not available on SGX targets
#[cfg(not(all(not(target_env = "sgx"), $(target_feature=$tf, )*)))]
#[cfg(all(not(target_env = "sgx"), not(all($(target_feature=$tf, )*))))]
let res = {
#[cfg(target_arch = "x86")]
use core::arch::x86::{__cpuid, __cpuid_count};
Expand All @@ -111,6 +111,8 @@ macro_rules! cpuid_bool {
})
};

#[cfg(all(target_env = "sgx", not(all($(target_feature=$tf, )*))))]
let res = false;
#[cfg(all($(target_feature=$tf, )*))]
let res = true;

Expand Down