Skip to content

Commit ac28b2f

Browse files
committed
Auto merge of rust-lang#110562 - ComputerDruid:riscv, r=tmandry
Add definitions for riscv64gc-unknown-fuchsia To compile, also requires a libc update with rust-lang/libc#3204
2 parents 3e6d34c + a15ca5c commit ac28b2f

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

core/src/ffi/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,10 @@ mod c_char_definition {
143143
target_arch = "powerpc"
144144
)
145145
),
146-
all(target_os = "fuchsia", target_arch = "aarch64"),
146+
all(
147+
target_os = "fuchsia",
148+
any(target_arch = "aarch64", target_arch = "riscv64")
149+
),
147150
all(target_os = "nto", target_arch = "aarch64"),
148151
target_os = "horizon"
149152
))] {

std/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] }
1515
panic_unwind = { path = "../panic_unwind", optional = true }
1616
panic_abort = { path = "../panic_abort" }
1717
core = { path = "../core" }
18-
libc = { version = "0.2.140", default-features = false, features = ['rustc-dep-of-std'] }
18+
libc = { version = "0.2.142", default-features = false, features = ['rustc-dep-of-std'] }
1919
compiler_builtins = { version = "0.1.91" }
2020
profiler_builtins = { path = "../profiler_builtins", optional = true }
2121
unwind = { path = "../unwind" }

std/src/os/fuchsia/raw.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,3 +286,9 @@ mod arch {
286286
pub __unused: [c_long; 3],
287287
}
288288
}
289+
290+
#[cfg(target_arch = "riscv64")]
291+
mod arch {
292+
#[stable(feature = "raw_ext", since = "1.1.0")]
293+
pub use libc::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
294+
}

0 commit comments

Comments
 (0)