Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpuid-bool: fix SGX support #67

Merged
merged 2 commits into from Jul 14, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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