Skip to content

Commit 85c395b

Browse files
authored
Merge pull request #563 from alistair23/alistair/riscv-builtins
build: Allow building C compiler-rt fallbacks for RISC-V
2 parents 47e64bf + d3210c5 commit 85c395b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

build.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,7 @@ fn main() {
5959
// * wasm - clang for wasm is somewhat hard to come by and it's
6060
// unlikely that the C is really that much better than our own Rust.
6161
// * nvptx - everything is bitcode, not compatible with mixed C/Rust
62-
// * riscv - the rust-lang/rust distribution container doesn't have a C
63-
// compiler.
64-
if !target.contains("wasm")
65-
&& !target.contains("nvptx")
66-
&& (!target.starts_with("riscv") || target.contains("xous"))
67-
{
62+
if !target.contains("wasm") && !target.contains("nvptx") {
6863
#[cfg(feature = "c")]
6964
c::compile(&llvm_target, &target);
7065
}
@@ -519,7 +514,7 @@ mod c {
519514
}
520515
}
521516

522-
if target_arch == "mips" {
517+
if target_arch == "mips" || target_arch == "riscv32" || target_arch == "riscv64" {
523518
sources.extend(&[("__bswapsi2", "bswapsi2.c")]);
524519
}
525520

0 commit comments

Comments
 (0)