Skip to content

Commit 0d38625

Browse files
committed
libm fixes
1 parent aa66044 commit 0d38625

File tree

4 files changed

+18
-19
lines changed

4 files changed

+18
-19
lines changed

compiler-builtins/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ Compiler intrinsics used by the Rust compiler. Also available for other targets
1313
if necessary!
1414
"""
1515
include = [
16-
# '/Cargo.toml',
17-
# '/build.rs',
18-
# '/configure.rs',
19-
# '/src/*',
20-
# '/examples/*',
21-
# '/LICENSE.txt',
22-
# '/README.md',
23-
# '/compiler-rt/*',
16+
'/Cargo.toml',
17+
'/build.rs',
18+
'/configure.rs',
19+
'/src/*',
20+
# '/examples/*',
21+
'../LICENSE.txt',
22+
'../README.md',
23+
'../compiler-rt/*',
2424
'../libm/src/math/*',
2525
]
2626
links = 'compiler-rt'

compiler-builtins/src/lib.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,19 @@ extern crate core;
3939
#[macro_use]
4040
mod macros;
4141

42+
#[rustfmt::skip]
43+
#[allow(dead_code)]
44+
#[allow(unused_imports)]
45+
#[allow(clippy::all)]
46+
mod libm;
47+
4248
pub mod float;
4349
pub mod int;
4450
pub mod math;
4551
pub mod mem;
4652

47-
// `libm` expects its `support` module to be available in the crate root. This config can be
48-
// cleaned up once `libm` is made always available.
49-
use math::libm::support;
53+
// `libm` expects its `support` module to be available in the crate root.
54+
use libm::support;
5055

5156
#[cfg(target_arch = "arm")]
5257
pub mod arm;

compiler-builtins/src/libm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../libm/src/math

compiler-builtins/src/math.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
1-
#[rustfmt::skip]
2-
#[allow(dead_code)]
3-
#[allow(unused_imports)]
4-
#[allow(clippy::all)]
5-
#[path = "../../libm/src/math/mod.rs"]
6-
pub(crate) mod libm;
7-
81
macro_rules! libm_intrinsics {
92
($(fn $fun:ident($($iid:ident : $ity:ty),+) -> $oty:ty;)+) => {
103
intrinsics! {
114
$(
125
pub extern "C" fn $fun($($iid: $ity),+) -> $oty {
13-
$crate::math::libm::$fun($($iid),+)
6+
$crate::libm::$fun($($iid),+)
147
}
158
)+
169
}

0 commit comments

Comments
 (0)