Skip to content

Commit eb80bd8

Browse files
Add support for loongarch64
1 parent 5dedbc7 commit eb80bd8

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

.cirrus.yml

+3
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,9 @@ task:
301301
- name: Haiku x86_64
302302
env:
303303
TARGET: x86_64-unknown-haiku
304+
- name: Loongnix
305+
env:
306+
TARGET: loongarch64-unknown-linux-gnuf64
304307
setup_script:
305308
- rustup component add rust-src
306309
<< : *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
@@ -35,7 +35,8 @@ mod consts {
3535
target_arch = "x86_64",
3636
target_arch = "aarch64",
3737
target_arch = "riscv32",
38-
target_arch = "riscv64"))]
38+
target_arch = "riscv64",
39+
target_arch = "loongarch64"))]
3940
mod consts {
4041
#[doc(hidden)]
4142
pub const NONE: u8 = 0;

src/sys/signal.rs

+9-4
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ libc_enum!{
6262
#[cfg(all(any(target_os = "android", target_os = "emscripten",
6363
target_os = "fuchsia", target_os = "linux"),
6464
not(any(target_arch = "mips", target_arch = "mips64",
65-
target_arch = "sparc64"))))]
65+
target_arch = "sparc64",
66+
target_arch = "loongarch64"))))]
6667
SIGSTKFLT,
6768
/// To parent on child stop or exit
6869
SIGCHLD,
@@ -138,7 +139,8 @@ impl FromStr for Signal {
138139
#[cfg(all(any(target_os = "android", target_os = "emscripten",
139140
target_os = "fuchsia", target_os = "linux"),
140141
not(any(target_arch = "mips", target_arch = "mips64",
141-
target_arch = "sparc64"))))]
142+
target_arch = "sparc64",
143+
target_arch = "loongarch64"))))]
142144
"SIGSTKFLT" => Signal::SIGSTKFLT,
143145
"SIGCHLD" => Signal::SIGCHLD,
144146
"SIGCONT" => Signal::SIGCONT,
@@ -197,7 +199,9 @@ impl Signal {
197199
Signal::SIGTERM => "SIGTERM",
198200
#[cfg(all(any(target_os = "android", target_os = "emscripten",
199201
target_os = "fuchsia", target_os = "linux"),
200-
not(any(target_arch = "mips", target_arch = "mips64", target_arch = "sparc64"))))]
202+
not(any(target_arch = "mips", target_arch = "mips64",
203+
target_arch = "sparc64",
204+
target_arch = "loongarch64"))))]
201205
Signal::SIGSTKFLT => "SIGSTKFLT",
202206
Signal::SIGCHLD => "SIGCHLD",
203207
Signal::SIGCONT => "SIGCONT",
@@ -312,7 +316,8 @@ const SIGNALS: [Signal; 28] = [
312316
#[cfg(all(any(target_os = "linux", target_os = "android",
313317
target_os = "emscripten", target_os = "fuchsia"),
314318
not(any(target_arch = "mips", target_arch = "mips64",
315-
target_arch = "sparc64"))))]
319+
target_arch = "sparc64",
320+
target_arch = "loongarch64"))))]
316321
#[cfg(feature = "signal")]
317322
const SIGNALS: [Signal; 31] = [
318323
SIGHUP,

0 commit comments

Comments
 (0)