about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2019-10-29 12:01:41 -0700
committerGitHub <noreply@github.com>2019-10-29 12:01:41 -0700
commit4bb91c7845211ffcfb2e5ee790028fb410645542 (patch)
treebed9459645c672ffdc00623e6d638b434bd21f65 /src
parente15f1be63e5d91b55e45428303a172a37b54af87 (diff)
parentcf65200e5c78c04a7d9f05c4d8131218624a7924 (diff)
downloadrust-4bb91c7845211ffcfb2e5ee790028fb410645542.tar.gz
rust-4bb91c7845211ffcfb2e5ee790028fb410645542.zip
Rollup merge of #65898 - hermitcore:rusty-hermit, r=kennytm
add basic HermitCore support within libtest

This an extension to #65167. The current pull request extend libtest to support HermitCore as target OS.
Diffstat (limited to 'src')
-rw-r--r--src/libtest/helpers/concurrency.rs6
-rw-r--r--src/libtest/helpers/isatty.rs2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/libtest/helpers/concurrency.rs b/src/libtest/helpers/concurrency.rs
index 61651a927c5..6b0c8a8af32 100644
--- a/src/libtest/helpers/concurrency.rs
+++ b/src/libtest/helpers/concurrency.rs
@@ -54,6 +54,12 @@ pub fn get_concurrency() -> usize {
         1
     }
 
+    #[cfg(target_os = "hermit")]
+    fn num_cpus() -> usize {
+        // FIXME: Implement num_cpus on HermitCore
+        1
+    }
+
     #[cfg(any(
         all(target_arch = "wasm32", not(target_os = "emscripten")),
         all(target_vendor = "fortanix", target_env = "sgx")
diff --git a/src/libtest/helpers/isatty.rs b/src/libtest/helpers/isatty.rs
index 6e4954778e6..4955e1fc888 100644
--- a/src/libtest/helpers/isatty.rs
+++ b/src/libtest/helpers/isatty.rs
@@ -2,7 +2,7 @@
 //! if stdout is a tty.
 
 #[cfg(any(
-    target_os = "cloudabi",
+    target_os = "cloudabi", target_os = "hermit",
     all(target_arch = "wasm32", not(target_os = "emscripten")),
     all(target_vendor = "fortanix", target_env = "sgx")
 ))]