Skip to content

Commit ae718d7

Browse files
Add support for loongarch64
Signed-off-by: Wenlong Zhang <[email protected]>
1 parent 20df092 commit ae718d7

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

.cirrus.yml

+3
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,9 @@ task:
288288
- name: Haiku x86_64
289289
env:
290290
TARGET: x86_64-unknown-haiku
291+
- name: Linux loongarch64 lp64d
292+
env:
293+
TARGET: loongarch64-unknown-linux-gnuf64
291294
setup_script:
292295
- rustup component add rust-src
293296
<< : *BUILD

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ Tier 3:
8686
* x86_64-unknown-linux-gnux32
8787
* x86_64-unknown-openbsd
8888
* x86_64-unknown-redox
89+
* loongarch64-unknown-linux-gnuf64
8990

9091
## Minimum Supported Rust Version (MSRV)
9192

src/sys/ioctl/linux.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ mod consts {
4242
target_arch = "x86_64",
4343
target_arch = "aarch64",
4444
target_arch = "riscv32",
45-
target_arch = "riscv64"
45+
target_arch = "riscv64",
46+
target_arch = "loongarch64"
4647
))]
4748
mod consts {
4849
#[doc(hidden)]

src/sys/signal.rs

+14-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,8 @@ const SIGNALS: [Signal; 28] = [
319319
not(any(
320320
target_arch = "mips",
321321
target_arch = "mips64",
322-
target_arch = "sparc64"
322+
target_arch = "sparc64",
323+
target_arch = "loongarch64"
323324
))
324325
))]
325326
#[cfg(feature = "signal")]
@@ -360,6 +361,18 @@ const SIGNALS: [Signal; 31] = [
360361
SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU, SIGURG, SIGXCPU, SIGXFSZ, SIGVTALRM,
361362
SIGPROF, SIGWINCH, SIGIO, SIGSYS, SIGEMT, SIGINFO,
362363
];
364+
#[cfg(all(
365+
any(target_os = "linux"),
366+
any(target_arch = "loongarch64")
367+
))]
368+
#[cfg(feature = "signal")]
369+
const SIGNALS: [Signal; 31] = [
370+
SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGTRAP, SIGABRT, SIGBUS,
371+
SIGFPE, SIGKILL, SIGUSR1, SIGSEGV, SIGUSR2, SIGPIPE, SIGALRM,
372+
SIGTERM, SIGSTKFLT, SIGCHLD, SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN,
373+
SIGTTOU, SIGURG, SIGXCPU, SIGXFSZ, SIGVTALRM, SIGPROF, SIGWINCH,
374+
SIGIO, SIGPWR, SIGSYS
375+
];
363376

364377
feature! {
365378
#![feature = "signal"]

0 commit comments

Comments
 (0)