Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 33ab99d

Browse files
committed
Refactor
Signed-off-by: Benjamin Schultzer <benjamin@schultzer.com>
1 parent 8b8eba2 commit 33ab99d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+663
-1095
lines changed

Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@ checked = []
2222
[workspace]
2323
members = [
2424
"crates/compiler-builtins-smoke-test",
25-
"crates/libm-test",
26-
"crates/test-framework"
25+
"crates/libm-test"
2726
]
2827

2928
[dev-dependencies]
3029
no-panic = "0.1.8"
31-
libm-test = { version = "0.*", path = "./crates/libm-test" }
32-
rand = "0.6.5"

ci/run.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -ex
44
TARGET=$1
55

66
cargo test --target $TARGET
7-
cargo test --features 'checked libm-test/conformance' --target $TARGET
8-
97
cargo test --target $TARGET --release
10-
cargo test --features 'checked libm-test/conformance' --target $TARGET --release
8+
9+
cargo test -p libm-test --target $TARGET
10+
cargo test -p libm-test --target $TARGET --release

crates/libm-test/Cargo.toml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,7 @@ name = "libm-test"
33
version = "0.1.0"
44
authors = ["Benjamin Schultzer <benjamin@schultzer.com>"]
55

6-
[lib]
7-
proc-macro = true
8-
test = false
9-
106
[dependencies]
11-
test-framework = { version = "0.*", path = "./../test-framework" }
12-
proc-macro2 = { version = "0.4", features = ["nightly"] }
13-
quote = "0.6"
14-
syn = { version = "0.15", features = ["full"] }
15-
16-
[features]
17-
conformance = []
7+
libm = { version = "0.*", path = "../../" }
8+
paste = "0.1.5"
9+
rand = "0.6.5"

crates/libm-test/build.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
use std::env;
2+
3+
fn main() {
4+
println!("cargo:rerun-if-changed=build.rs");
5+
let opt_level = env::var("OPT_LEVEL")
6+
.ok()
7+
.and_then(|s| s.parse().ok())
8+
.unwrap_or(0);
9+
let profile = env::var("PROFILE").unwrap_or(String::new());
10+
if profile == "release" || opt_level >= 2 {
11+
println!("cargo:rustc-cfg=optimized");
12+
}
13+
}

0 commit comments

Comments
 (0)