From d04f5208ba67c90e145438b459f99f2d634026ae Mon Sep 17 00:00:00 2001 From: Yu Ding Date: Mon, 31 Dec 2018 15:45:42 -0800 Subject: Bound sgx target_env with fortanix as target_vendor Signed-off-by: Yu Ding --- src/libstd/lib.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/libstd/lib.rs') diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 6ded43dfed1..3b7e8291d38 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -302,9 +302,10 @@ #![feature(non_exhaustive)] #![feature(alloc_layout_extra)] #![feature(maybe_uninit)] -#![cfg_attr(target_env = "sgx", feature(global_asm, range_contains, slice_index_methods, - decl_macro, coerce_unsized, sgx_platform, - min_const_unsafe_fn))] +#![cfg_attr(all(target_vendor = "fortanix", target_env = "sgx"), + feature(global_asm, range_contains, slice_index_methods, + decl_macro, coerce_unsized, sgx_platform, + min_const_unsafe_fn))] #![default_lib_allocator] @@ -347,7 +348,7 @@ extern crate backtrace_sys; // testing gives test-std access to real-std lang items and globals. See #2912 #[cfg(test)] extern crate std as realstd; -#[cfg(target_env = "sgx")] +#[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] #[macro_use] #[allow(unused_imports)] // FIXME: without `#[macro_use]`, get error: “cannot // determine resolution for the macro `usercalls_asm`” -- cgit 1.4.1-3-g733a5