mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-21 12:07:31 +00:00
build: Allow building C compiler-rt fallbacks for RISC-V
Now that https://github.com/rust-lang/rust/pull/117654 has been merged the rust-lang/rust distribution containers contain RISC-V C compilers. This means that we can now enable the "c" feature fallback. Resolves: https://github.com/rust-lang/compiler-builtins/issues/350 Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
72dbe301ff
commit
e898296fd9
@ -59,12 +59,7 @@ fn main() {
|
||||
// * wasm - clang for wasm is somewhat hard to come by and it's
|
||||
// unlikely that the C is really that much better than our own Rust.
|
||||
// * nvptx - everything is bitcode, not compatible with mixed C/Rust
|
||||
// * riscv - the rust-lang/rust distribution container doesn't have a C
|
||||
// compiler.
|
||||
if !target.contains("wasm")
|
||||
&& !target.contains("nvptx")
|
||||
&& (!target.starts_with("riscv") || target.contains("xous"))
|
||||
{
|
||||
if !target.contains("wasm") && !target.contains("nvptx") {
|
||||
#[cfg(feature = "c")]
|
||||
c::compile(&llvm_target, &target);
|
||||
}
|
||||
@ -519,7 +514,7 @@ mod c {
|
||||
}
|
||||
}
|
||||
|
||||
if target_arch == "mips" {
|
||||
if target_arch == "mips" || target_arch == "riscv32" || target_arch == "riscv64" {
|
||||
sources.extend(&[("__bswapsi2", "bswapsi2.c")]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user