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 ae718d7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 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: Linux loongarch64 lp64d
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
15 changes: 14 additions & 1 deletion src/sys/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,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 Expand Up @@ -360,6 +361,18 @@ const SIGNALS: [Signal; 31] = [
SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU, SIGURG, SIGXCPU, SIGXFSZ, SIGVTALRM,
SIGPROF, SIGWINCH, SIGIO, SIGSYS, SIGEMT, SIGINFO,
];
#[cfg(all(
any(target_os = "linux"),
any(target_arch = "loongarch64")
))]
#[cfg(feature = "signal")]
const SIGNALS: [Signal; 31] = [
SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGTRAP, SIGABRT, SIGBUS,
SIGFPE, SIGKILL, SIGUSR1, SIGSEGV, SIGUSR2, SIGPIPE, SIGALRM,
SIGTERM, SIGSTKFLT, SIGCHLD, SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN,
SIGTTOU, SIGURG, SIGXCPU, SIGXFSZ, SIGVTALRM, SIGPROF, SIGWINCH,
SIGIO, SIGPWR, SIGSYS
];

feature! {
#![feature = "signal"]
Expand Down

0 comments on commit ae718d7

Please sign in to comment.