File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,11 @@ fn main() {
5858 // unlikely that the C is really that much better than our own Rust.
5959 // * nvptx - everything is bitcode, not compatible with mixed C/Rust
6060 // * riscv - the rust-lang/rust distribution container doesn't have a C
61- // compiler nor is cc-rs ready for compilation to riscv (at this
62- // time). This can probably be removed in the future
63- if !target. contains ( "wasm" ) && !target. contains ( "nvptx" ) && !target. starts_with ( "riscv" ) {
61+ // compiler.
62+ if !target. contains ( "wasm" )
63+ && !target. contains ( "nvptx" )
64+ && ( !target. starts_with ( "riscv" ) || target. contains ( "xous" ) )
65+ {
6466 #[ cfg( feature = "c" ) ]
6567 c:: compile ( & llvm_target, & target) ;
6668 }
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ pub mod int;
4646 all( target_family = "wasm" , target_os = "unknown" ) ,
4747 all( target_arch = "x86_64" , target_os = "uefi" ) ,
4848 all( target_arch = "arm" , target_os = "none" ) ,
49+ target_os = "xous" ,
4950 all( target_vendor = "fortanix" , target_env = "sgx" )
5051) ) ]
5152pub mod math;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ macro_rules! no_mangle {
2020 target_os = "unknown" ,
2121 not( target_env = "wasi" )
2222 ) ,
23+ target_os = "xous" ,
2324 all( target_arch = "x86_64" , target_os = "uefi" ) ,
2425 all( target_arch = "xtensa" , target_os = "none" ) ,
2526 all( target_vendor = "fortanix" , target_env = "sgx" )
@@ -70,6 +71,7 @@ no_mangle! {
7071 target_os = "unknown" ,
7172 not( target_env = "wasi" )
7273 ) ,
74+ target_os = "xous" ,
7375 all( target_arch = "xtensa" , target_os = "none" ) ,
7476 all( target_vendor = "fortanix" , target_env = "sgx" )
7577) ) ]
@@ -93,7 +95,16 @@ no_mangle! {
9395 fn tanf( n: f32 ) -> f32 ;
9496}
9597
96- #[ cfg( all( target_vendor = "fortanix" , target_env = "sgx" ) ) ]
98+ #[ cfg( target_os = "xous" ) ]
99+ no_mangle ! {
100+ fn sqrtf( x: f32 ) -> f32 ;
101+ fn sqrt( x: f64 ) -> f64 ;
102+ }
103+
104+ #[ cfg( any(
105+ all( target_vendor = "fortanix" , target_env = "sgx" ) ,
106+ target_os = "xous"
107+ ) ) ]
97108no_mangle ! {
98109 fn ceil( x: f64 ) -> f64 ;
99110 fn ceilf( x: f32 ) -> f32 ;
You can’t perform that action at this time.
0 commit comments