Skip to content

Commit 06a46b7

Browse files
Remove gating on target architecture in math.rs
Provide math builtins for every "none" target instead of gating on specific architectures, with exception being soft floating point functions to avoid double declarations
1 parent ce1e4d2 commit 06a46b7

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/math.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ macro_rules! no_mangle {
2323
),
2424
target_os = "xous",
2525
target_os = "uefi",
26-
all(target_arch = "xtensa", target_os = "none"),
26+
target_os = "none",
2727
all(target_vendor = "fortanix", target_env = "sgx")
2828
))]
2929
no_mangle! {
@@ -95,7 +95,7 @@ no_mangle! {
9595
),
9696
target_os = "xous",
9797
target_os = "uefi",
98-
all(target_arch = "xtensa", target_os = "none"),
98+
target_os = "none",
9999
all(target_vendor = "fortanix", target_env = "sgx"),
100100
target_os = "windows"
101101
))]
@@ -113,19 +113,15 @@ intrinsics! {
113113
}
114114
}
115115

116-
#[cfg(any(
117-
target_os = "xous",
118-
target_os = "uefi",
119-
all(target_arch = "xtensa", target_os = "none"),
120-
))]
116+
#[cfg(any(target_os = "xous", target_os = "uefi", target_os = "none",))]
121117
no_mangle! {
122118
fn sqrtf(x: f32) -> f32;
123119
fn sqrt(x: f64) -> f64;
124120
}
125121

126122
#[cfg(any(
127123
all(target_vendor = "fortanix", target_env = "sgx"),
128-
all(target_arch = "xtensa", target_os = "none"),
124+
target_os = "none",
129125
target_os = "xous",
130126
target_os = "uefi"
131127
))]

0 commit comments

Comments
 (0)