Merge pull request #680 from Amjad50/fix-builtin-math-symbols-ignored
Don't include `math` for `unix` and `wasi` targets
This commit is contained in:
commit
b99359f70d
2 changed files with 12 additions and 4 deletions
|
|
@ -47,9 +47,16 @@ mod macros;
|
|||
pub mod float;
|
||||
pub mod int;
|
||||
|
||||
// Disabled on x86 without sse2 due to ABI issues
|
||||
// <https://github.com/rust-lang/rust/issues/114479>
|
||||
#[cfg(not(all(target_arch = "x86", not(target_feature = "sse2"))))]
|
||||
// Disable for any of the following:
|
||||
// - x86 without sse2 due to ABI issues
|
||||
// - <https://github.com/rust-lang/rust/issues/114479>
|
||||
// - All unix targets (linux, macos, freebsd, android, etc)
|
||||
// - wasm with known target_os
|
||||
#[cfg(not(any(
|
||||
all(target_arch = "x86", not(target_feature = "sse2")),
|
||||
unix,
|
||||
all(target_family = "wasm", not(target_os = "unknown"))
|
||||
)))]
|
||||
pub mod math;
|
||||
pub mod mem;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ macro_rules! no_mangle {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(all(not(windows), not(target_vendor = "apple")))]
|
||||
#[cfg(not(windows))]
|
||||
no_mangle! {
|
||||
fn acos(x: f64) -> f64;
|
||||
fn asin(x: f64) -> f64;
|
||||
|
|
@ -92,6 +92,7 @@ no_mangle! {
|
|||
fn fmodf(x: f32, y: f32) -> f32;
|
||||
}
|
||||
|
||||
// allow for windows (and other targets)
|
||||
intrinsics! {
|
||||
pub extern "C" fn lgamma_r(x: f64, s: &mut i32) -> f64 {
|
||||
let r = self::libm::lgamma_r(x);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue