Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for AIX #2030

Merged
merged 2 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pub enum Os {
Haiku,
Emscripten,
Wasi,
Aix,
}

impl fmt::Display for Os {
Expand All @@ -47,6 +48,7 @@ impl fmt::Display for Os {
Os::Haiku => write!(f, "Haiku"),
Os::Emscripten => write!(f, "Emscripten"),
Os::Wasi => write!(f, "Wasi"),
Os::Aix => write!(f, "AIX"),
}
}
}
Expand Down Expand Up @@ -184,6 +186,7 @@ fn get_supported_architectures(os: &Os) -> Vec<Arch> {
Os::Haiku => vec![Arch::X86_64],
Os::Solaris => vec![Arch::X86_64, Arch::Sparc64],
Os::Emscripten | Os::Wasi => vec![Arch::Wasm32],
Os::Aix => vec![Arch::Powerpc64],
}
}

Expand Down Expand Up @@ -244,6 +247,7 @@ impl Target {
OperatingSystem::Haiku => Os::Haiku,
OperatingSystem::Emscripten => Os::Emscripten,
OperatingSystem::Wasi => Os::Wasi,
OperatingSystem::Aix => Os::Aix,
unsupported => bail!("The operating system {:?} is not supported", unsupported),
};

Expand Down Expand Up @@ -375,6 +379,7 @@ impl Target {
Os::Emscripten => "emscripten",
// This isn't real, there's no sys.platform here
Os::Wasi => "wasi",
Os::Aix => "aix",
}
}

Expand Down Expand Up @@ -457,7 +462,8 @@ impl Target {
| Os::Illumos
| Os::Haiku
| Os::Emscripten
| Os::Wasi => true,
| Os::Wasi
| Os::Aix => true,
}
}

Expand Down
Loading