Skip to content

Commit

Permalink
Disable libm on x86 without sse2
Browse files Browse the repository at this point in the history
In <rust-lang#594>, symbols
for the Rust port of libm were made always weakly available. This seems
to be causing problems on platforms with ABI issues, as explained at
<rust-lang/rust#125016 (comment)>.

Disable Rust libm on x86 without sse2 to mitigate this.
  • Loading branch information
tgross35 committed Jun 18, 2024
1 parent c04eb9e commit 9ba77d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ 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"))))]
pub mod math;
pub mod mem;

Expand Down

0 comments on commit 9ba77d1

Please sign in to comment.