Skip to content

Commit

Permalink
Add support for target x86_64h-apple-darwin (#93)
Browse files Browse the repository at this point in the history
Signed-off-by: Jiahao XU <[email protected]>
  • Loading branch information
NobodyXu committed Jul 31, 2023
1 parent e7bf725 commit 6ac8f1b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/targets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ pub enum Architecture {
Wasm32,
Wasm64,
X86_64,
/// x86_64 target that only supports Haswell-compatible Intel chips.
X86_64h,
XTensa,
Clever(CleverArchitecture),
}
Expand Down Expand Up @@ -839,6 +841,7 @@ impl Architecture {
| Wasm32
| Wasm64
| X86_64
| X86_64h
| XTensa
| Clever(_) => Ok(Endianness::Little),
Bpfeb
Expand Down Expand Up @@ -883,6 +886,7 @@ impl Architecture {
| Powerpc64le
| Riscv64(_)
| X86_64
| X86_64h
| Mips64(_)
| Nvptx64
| Powerpc64
Expand Down Expand Up @@ -936,6 +940,7 @@ impl Architecture {
Wasm32 => Cow::Borrowed("wasm32"),
Wasm64 => Cow::Borrowed("wasm64"),
X86_64 => Cow::Borrowed("x86_64"),
X86_64h => Cow::Borrowed("x86_64h"),
XTensa => Cow::Borrowed("xtensa"),
Clever(ver) => ver.into_str(),
}
Expand Down Expand Up @@ -1211,6 +1216,7 @@ impl FromStr for Architecture {
"wasm32" => Wasm32,
"wasm64" => Wasm64,
"x86_64" => X86_64,
"x86_64h" => X86_64h,
"xtensa" => XTensa,
_ => {
if let Ok(arm) = ArmArchitecture::from_str(s) {
Expand Down Expand Up @@ -1663,6 +1669,7 @@ mod tests {
"wasm64-unknown-unknown",
"wasm64-wasi",
"x86_64-apple-darwin",
"x86_64h-apple-darwin",
"x86_64-apple-ios",
"x86_64-apple-ios-macabi",
"x86_64-apple-tvos",
Expand Down

0 comments on commit 6ac8f1b

Please sign in to comment.