Make the documentation build work on CloudABI.

Just like with wasm, we can't just import unix::ext and windows::ext.
Our shims are not complete enough for that.
This commit is contained in:
Ed Schouten
2018-01-11 11:21:12 +01:00
parent d9d97c9f09
commit cc8565b20a

View File

@@ -62,9 +62,10 @@ cfg_if! {
if #[cfg(any(unix, target_os = "redox"))] { if #[cfg(any(unix, target_os = "redox"))] {
// On unix we'll document what's already available // On unix we'll document what's already available
pub use self::ext as unix_ext; pub use self::ext as unix_ext;
} else if #[cfg(target_arch = "wasm32")] { } else if #[cfg(any(target_os = "cloudabi", target_arch = "wasm32"))] {
// On wasm right now the module below doesn't compile (missing things // On CloudABI and wasm right now the module below doesn't compile
// in `libc` which is empty) so just omit everything with an empty module // (missing things in `libc` which is empty) so just omit everything
// with an empty module
#[unstable(issue = "0", feature = "std_internals")] #[unstable(issue = "0", feature = "std_internals")]
pub mod unix_ext {} pub mod unix_ext {}
} else { } else {
@@ -80,8 +81,9 @@ cfg_if! {
if #[cfg(windows)] { if #[cfg(windows)] {
// On windows we'll just be documenting what's already available // On windows we'll just be documenting what's already available
pub use self::ext as windows_ext; pub use self::ext as windows_ext;
} else if #[cfg(target_arch = "wasm32")] { } else if #[cfg(any(target_os = "cloudabi", target_arch = "wasm32"))] {
// On wasm right now the shim below doesn't compile, so just omit it // On CloudABI and wasm right now the shim below doesn't compile, so
// just omit it
#[unstable(issue = "0", feature = "std_internals")] #[unstable(issue = "0", feature = "std_internals")]
pub mod windows_ext {} pub mod windows_ext {}
} else { } else {