Upgrade libm to 0.2.6
This project was upgraded with external_updater.
Usage: tools/external_updater/updater.sh update rust/crates/libm
For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md
Test: TreeHugger
Change-Id: Ice2b5301410aa8ca11066571f43a464fa96168ba
diff --git a/build.rs b/build.rs
index 9af6dec..80145a9 100644
--- a/build.rs
+++ b/build.rs
@@ -18,6 +18,7 @@
mod musl_reference_tests {
use rand::seq::SliceRandom;
use rand::Rng;
+ use std::env;
use std::fs;
use std::process::Command;
@@ -26,7 +27,19 @@
// These files are all internal functions or otherwise miscellaneous, not
// defining a function we want to test.
- const IGNORED_FILES: &[&str] = &["fenv.rs"];
+ const IGNORED_FILES: &[&str] = &[
+ "fenv.rs",
+ // These are giving slightly different results compared to musl
+ "lgamma.rs",
+ "lgammaf.rs",
+ "tgamma.rs",
+ "j0.rs",
+ "j0f.rs",
+ "jn.rs",
+ "jnf.rs",
+ "j1.rs",
+ "j1f.rs",
+ ];
struct Function {
name: String,
@@ -48,6 +61,12 @@
}
pub fn generate() {
+ // PowerPC tests are failing on LLVM 13: https://github.com/rust-lang/rust/issues/88520
+ let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
+ if target_arch == "powerpc64" {
+ return;
+ }
+
let files = fs::read_dir("src/math")
.unwrap()
.map(|f| f.unwrap().path())