Skip to content

Commit 218be4d

Browse files
committed
Auto merge of #31078 - nbaksalyar:illumos, r=alexcrichton
This pull request adds support for [Illumos](http://illumos.org/)-based operating systems: SmartOS, OpenIndiana, and others. For now it's x86-64 only, as I'm not sure if 32-bit installations are widespread. This PR is based on #28589 by @potatosalad, and also closes #21000, #25845, and #25846. Required changes in libc are already merged: rust-lang/libc#138 Here's a snapshot required to build a stage0 compiler: https://s3-eu-west-1.amazonaws.com/nbaksalyar/rustc-sunos-snapshot.tar.gz It passes all checks from `make check`. There are some changes I'm not quite sure about, e.g. macro usage in `src/libstd/num/f64.rs` and `DirEntry` structure in `src/libstd/sys/unix/fs.rs`, so any comments on how to rewrite it better would be greatly appreciated. Also, LLVM configure script might need to be patched to build it successfully, or a pre-built libLLVM should be used. Some details can be found here: https://llvm.org/bugs/show_bug.cgi?id=25409 Thanks! r? @brson
2 parents 863dad2 + 9bdf6c6 commit 218be4d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,8 @@ fn get_concurrency() -> usize {
927927
#[cfg(any(target_os = "linux",
928928
target_os = "macos",
929929
target_os = "ios",
930-
target_os = "android"))]
930+
target_os = "android",
931+
target_os = "solaris"))]
931932
fn num_cpus() -> usize {
932933
unsafe { libc::sysconf(libc::_SC_NPROCESSORS_ONLN) as usize }
933934
}

0 commit comments

Comments
 (0)