Skip to content

Commit

Permalink
Don't use an explicit copysign feature
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Apr 30, 2022
1 parent 30f8d3a commit 3007712
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Expand Up @@ -23,7 +23,6 @@ libm = { version = "0.2.0", optional = true }
default = ["std"]
std = []
i128 = []
copysign = []

[build-dependencies]
autocfg = "1"
8 changes: 4 additions & 4 deletions build.rs
Expand Up @@ -11,10 +11,6 @@ fn main() {
autocfg::emit("has_i128");
}

if env::var_os("CARGO_FEATURE_COPYSIGN").is_some() || ac.probe_expression("f32::copysign") {
autocfg::emit("has_copysign");
}

ac.emit_expression_cfg(
"unsafe { 1f64.to_int_unchecked::<i32>() }",
"has_to_int_unchecked",
Expand All @@ -25,5 +21,9 @@ fn main() {
ac.emit_expression_cfg("{ let mut x = 1; x += &2; }", "has_int_assignop_ref");
ac.emit_expression_cfg("1u32.div_euclid(1u32)", "has_div_euclid");

if env::var_os("CARGO_FEATURE_STD").is_some() {
ac.emit_expression_cfg("1f64.copysign(-1f64)", "has_copysign");
}

autocfg::rerun_path("build.rs");
}

0 comments on commit 3007712

Please sign in to comment.