Skip to content

Commit

Permalink
Add support for loongarch64
Browse files Browse the repository at this point in the history
Signed-off-by: Wenlong Zhang <[email protected]>
  • Loading branch information
zhangwenlong8911 committed Nov 8, 2022
1 parent 20df092 commit c95fd7c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ task:
- name: Haiku x86_64
env:
TARGET: x86_64-unknown-haiku
- name: Loongnix
env:
TARGET: loongarch64-unknown-linux-gnuf64
setup_script:
- rustup component add rust-src
<< : *BUILD
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ Tier 3:
* x86_64-unknown-linux-gnux32
* x86_64-unknown-openbsd
* x86_64-unknown-redox
* loongarch64-unknown-linux-gnuf64

## Minimum Supported Rust Version (MSRV)

Expand Down
3 changes: 2 additions & 1 deletion src/sys/ioctl/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ mod consts {
target_arch = "x86_64",
target_arch = "aarch64",
target_arch = "riscv32",
target_arch = "riscv64"
target_arch = "riscv64",
target_arch = "loongarch64"
))]
mod consts {
#[doc(hidden)]
Expand Down
12 changes: 8 additions & 4 deletions src/sys/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ libc_enum! {
#[cfg(all(any(target_os = "android", target_os = "emscripten",
target_os = "fuchsia", target_os = "linux"),
not(any(target_arch = "mips", target_arch = "mips64",
target_arch = "sparc64"))))]
target_arch = "sparc64",
target_arch = "loongarch64"))))]
SIGSTKFLT,
/// To parent on child stop or exit
SIGCHLD,
Expand Down Expand Up @@ -145,7 +146,8 @@ impl FromStr for Signal {
not(any(
target_arch = "mips",
target_arch = "mips64",
target_arch = "sparc64"
target_arch = "sparc64",
target_arch = "loongarch64"
))
))]
"SIGSTKFLT" => Signal::SIGSTKFLT,
Expand Down Expand Up @@ -228,7 +230,8 @@ impl Signal {
not(any(
target_arch = "mips",
target_arch = "mips64",
target_arch = "sparc64"
target_arch = "sparc64",
target_arch = "loongarch64"
))
))]
Signal::SIGSTKFLT => "SIGSTKFLT",
Expand Down Expand Up @@ -319,7 +322,8 @@ const SIGNALS: [Signal; 28] = [
not(any(
target_arch = "mips",
target_arch = "mips64",
target_arch = "sparc64"
target_arch = "sparc64",
target_arch = "loongarch64"
))
))]
#[cfg(feature = "signal")]
Expand Down

0 comments on commit c95fd7c

Please sign in to comment.