about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorYu Ding <dingelish@gmail.com>2018-12-31 15:45:42 -0800
committerYu Ding <dingelish@gmail.com>2018-12-31 16:32:56 -0800
commitd04f5208ba67c90e145438b459f99f2d634026ae (patch)
tree89a54526da1c347910242fe2121327e8da4830b5 /src/libstd/sys
parent6efaef61899f6551914156f69809aa7d5854399d (diff)
downloadrust-d04f5208ba67c90e145438b459f99f2d634026ae.tar.gz
rust-d04f5208ba67c90e145438b459f99f2d634026ae.zip
Bound sgx target_env with fortanix as target_vendor
Signed-off-by: Yu Ding <dingelish@gmail.com>
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/mod.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libstd/sys/mod.rs b/src/libstd/sys/mod.rs
index de9e09bf705..f398a2a6225 100644
--- a/src/libstd/sys/mod.rs
+++ b/src/libstd/sys/mod.rs
@@ -38,7 +38,7 @@ cfg_if! {
     } else if #[cfg(target_arch = "wasm32")] {
         mod wasm;
         pub use self::wasm::*;
-    } else if #[cfg(target_env = "sgx")] {
+    } else if #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] {
         mod sgx;
         pub use self::sgx::*;
     } else {
@@ -55,7 +55,9 @@ cfg_if! {
     if #[cfg(any(unix, target_os = "redox"))] {
         // On unix we'll document what's already available
         pub use self::ext as unix_ext;
-    } else if #[cfg(any(target_os = "cloudabi", target_arch = "wasm32", target_env = "sgx"))] {
+    } else if #[cfg(any(target_os = "cloudabi",
+                        target_arch = "wasm32",
+                        all(target_vendor = "fortanix", target_env = "sgx")))] {
         // On CloudABI and wasm right now the module below doesn't compile
         // (missing things in `libc` which is empty) so just omit everything
         // with an empty module
@@ -76,7 +78,9 @@ cfg_if! {
         // On windows we'll just be documenting what's already available
         #[allow(missing_docs)]
         pub use self::ext as windows_ext;
-    } else if #[cfg(any(target_os = "cloudabi", target_arch = "wasm32", target_env = "sgx"))] {
+    } else if #[cfg(any(target_os = "cloudabi",
+                        target_arch = "wasm32",
+                        all(target_vendor = "fortanix", target_env = "sgx")))] {
         // On CloudABI and wasm right now the shim below doesn't compile, so
         // just omit it
         #[unstable(issue = "0", feature = "std_internals")]