File tree 3 files changed +18
-4
lines changed
3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,11 @@ fn main() {
58
58
// unlikely that the C is really that much better than our own Rust.
59
59
// * nvptx - everything is bitcode, not compatible with mixed C/Rust
60
60
// * 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
+ {
64
66
#[ cfg( feature = "c" ) ]
65
67
c:: compile ( & llvm_target, & target) ;
66
68
}
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ pub mod int;
46
46
all( target_family = "wasm" , target_os = "unknown" ) ,
47
47
all( target_arch = "x86_64" , target_os = "uefi" ) ,
48
48
all( target_arch = "arm" , target_os = "none" ) ,
49
+ target_os = "xous" ,
49
50
all( target_vendor = "fortanix" , target_env = "sgx" )
50
51
) ) ]
51
52
pub mod math;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ macro_rules! no_mangle {
20
20
target_os = "unknown" ,
21
21
not( target_env = "wasi" )
22
22
) ,
23
+ target_os = "xous" ,
23
24
all( target_arch = "x86_64" , target_os = "uefi" ) ,
24
25
all( target_arch = "xtensa" , target_os = "none" ) ,
25
26
all( target_vendor = "fortanix" , target_env = "sgx" )
@@ -70,6 +71,7 @@ no_mangle! {
70
71
target_os = "unknown" ,
71
72
not( target_env = "wasi" )
72
73
) ,
74
+ target_os = "xous" ,
73
75
all( target_arch = "xtensa" , target_os = "none" ) ,
74
76
all( target_vendor = "fortanix" , target_env = "sgx" )
75
77
) ) ]
@@ -93,7 +95,16 @@ no_mangle! {
93
95
fn tanf( n: f32 ) -> f32 ;
94
96
}
95
97
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
+ ) ) ]
97
108
no_mangle ! {
98
109
fn ceil( x: f64 ) -> f64 ;
99
110
fn ceilf( x: f32 ) -> f32 ;
You can’t perform that action at this time.
0 commit comments