File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,15 @@ fn main() {
3737 // build anything and we rely on the upstream implementation of compiler-rt
3838 // functions
3939 if !cfg ! ( feature = "mangled-names" ) && cfg ! ( feature = "c" ) {
40- // Don't use C compiler for bitcode-only wasm and nvptx
41- if !target. contains ( "wasm32" ) && !target. contains ( "nvptx" ) {
40+ // Don't use a C compiler for these targets:
41+ //
42+ // * wasm32 - clang 8 for wasm is somewhat hard to come by and it's
43+ // unlikely that the C is really that much better than our own Rust.
44+ // * nvptx - everything is bitcode, not compatible with mixed C/Rust
45+ // * riscv - the rust-lang/rust distribution container doesn't have a C
46+ // compiler nor is cc-rs ready for compilation to riscv (at this
47+ // time). This can probably be removed in the future
48+ if !target. contains ( "wasm32" ) && !target. contains ( "nvptx" ) && !target. starts_with ( "riscv" ) {
4249 #[ cfg( feature = "c" ) ]
4350 c:: compile ( & llvm_target) ;
4451 println ! ( "cargo:rustc-cfg=use_c" ) ;
You can’t perform that action at this time.
0 commit comments