Skip to content

Commit ccf802a

Browse files
committed
Update the libm submodule
This requires privately reexporting `libm`'s `support` module at crate root, where it is expected for macros. Once `libm` is made always available, the reexport can be simplified.
1 parent f322090 commit ccf802a

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

libm

Submodule libm updated 135 files

src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,20 @@ pub mod int;
5858
all(target_family = "wasm", not(target_os = "unknown"))
5959
)))]
6060
pub mod math;
61+
62+
// `libm` expects its `support` module to be available in the crate root. This config can be
63+
// cleaned up once `libm` is made always available.
64+
#[cfg(not(any(
65+
all(
66+
target_arch = "x86",
67+
not(target_feature = "sse2"),
68+
not(target_os = "uefi"),
69+
),
70+
unix,
71+
all(target_family = "wasm", not(target_os = "unknown"))
72+
)))]
73+
use math::libm::support;
74+
6175
pub mod mem;
6276

6377
#[cfg(target_arch = "arm")]

src/math.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#[allow(unused_imports)]
44
#[allow(clippy::all)]
55
#[path = "../libm/src/math/mod.rs"]
6-
mod libm;
6+
pub(crate) mod libm;
77

88
#[allow(unused_macros)]
99
macro_rules! no_mangle {

0 commit comments

Comments
 (0)