Skip to content

Commit 6c51404

Browse files
committed
libm: Fix crate compilation
Update paths and submodules to fix `libm-test` and `util` building so we will be able to add them to the workspace.
1 parent d69c42a commit 6c51404

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

.gitmodules

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[submodule "musl"]
2-
path = libm/crates/musl-math-sys/musl
1+
[submodule "crates/musl-math-sys/musl"]
2+
path = crates/musl-math-sys/musl
33
url = https://git.musl-libc.org/git/musl
44
shallow = true

crates/musl-math-sys/musl

Submodule musl added at 0784374

crates/util/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ unstable-float = ["libm/unstable-float", "libm-test/unstable-float", "rug?/night
1313
[dependencies]
1414
libm = { path = "../../libm", default-features = false }
1515
libm-macros = { path = "../libm-macros" }
16-
libm-test = { path = "../libm-test", default-features = false }
16+
libm-test = { path = "../../libm-test", default-features = false }
1717
musl-math-sys = { path = "../musl-math-sys", optional = true }
1818
rug = { version = "1.27.0", optional = true, default-features = false, features = ["float", "std"] }

libm-test/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ anyhow = "1.0.97"
3232
gmp-mpfr-sys = { version = "1.6.4", optional = true, default-features = false }
3333
iai-callgrind = { version = "0.14.0", optional = true }
3434
indicatif = { version = "0.17.11", default-features = false }
35-
libm = { path = "../../libm", features = ["unstable-public-internals"] }
36-
libm-macros = { path = "../libm-macros" }
37-
musl-math-sys = { path = "../musl-math-sys", optional = true }
35+
libm = { path = "../libm", features = ["unstable-public-internals"] }
36+
libm-macros = { path = "../crates/libm-macros" }
37+
musl-math-sys = { path = "../crates/musl-math-sys", optional = true }
3838
paste = "1.0.15"
3939
rand = "0.9.0"
4040
rand_chacha = "0.9.0"

libm-test/build.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#[path = "../../libm/configure.rs"]
1+
#[path = "../libm/configure.rs"]
22
mod configure;
33
use configure::Config;
44

55
fn main() {
6-
println!("cargo:rerun-if-changed=../../libm/configure.rs");
6+
println!("cargo:rerun-if-changed=../libm/configure.rs");
77
let cfg = Config::from_env();
88
configure::emit_test_config(&cfg);
99
}

libm-test/src/op.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
use std::fmt;
1717
use std::panic::{RefUnwindSafe, UnwindSafe};
1818

19-
pub use shared::{ALL_OPERATIONS, FloatTy, MathOpInfo, Ty};
19+
pub use shared::{FloatTy, MathOpInfo, Ty, ALL_OPERATIONS};
2020

2121
use crate::{CheckOutput, Float, TupleCall};
2222

2323
mod shared {
24-
include!("../../libm-macros/src/shared.rs");
24+
include!("../../crates/libm-macros/src/shared.rs");
2525
}
2626

2727
/// An enum representing each possible symbol name (`sin`, `sinf`, `sinl`, etc).

0 commit comments

Comments
 (0)