Skip to content

Commit

Permalink
cpuid-bool: fix SGX support (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Jul 14, 2020
1 parent 9b269d5 commit 93d93bd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions cpuid-bool/CHANGELOG.md
@@ -0,0 +1,15 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

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

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

## 0.1.0 (2020-06-11)
- Initial release
2 changes: 1 addition & 1 deletion cpuid-bool/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "cpuid-bool"
version = "0.1.0"
version = "0.1.1"
authors = ["RustCrypto Developers"]
license = "MIT OR Apache-2.0"
description = "A lightweight no-std compatible alternative to is_x86_feature_detected"
Expand Down
3 changes: 2 additions & 1 deletion cpuid-bool/src/lib.rs
Expand Up @@ -92,7 +92,8 @@ expand_check_macro! {
#[macro_export]
macro_rules! cpuid_bool {
($($tf:tt),+ $(,)? ) => {{
#[cfg(not(all($(target_feature=$tf, )*)))]
// CPUID is not available on SGX targets
#[cfg(not(all(not(target_env = "sgx"), $(target_feature=$tf, )*)))]
let res = {
#[cfg(target_arch = "x86")]
use core::arch::x86::{__cpuid, __cpuid_count};
Expand Down

0 comments on commit 93d93bd

Please sign in to comment.