فهرست منبع

Use better cfg name for arm-linux tests

Matt Ickstadt 8 سال پیش
والد
کامیت
f68475e080
2فایلهای تغییر یافته به همراه5 افزوده شده و 4 حذف شده
  1. 3 2
      build.rs
  2. 2 2
      src/float/add.rs

+ 3 - 2
build.rs

@@ -424,8 +424,9 @@ fn main() {
     }
 
     // To filter away some flaky test (see src/float/add.rs for details)
-    if llvm_target.last().unwrap().contains("gnueabi") {
-        println!("cargo:rustc-cfg=gnueabi")
+    if llvm_target[0].starts_with("arm") &&
+       llvm_target.last().unwrap().contains("gnueabi") {
+        println!("cargo:rustc-cfg=arm_linux")
     }
 
     // To compile intrinsics.rs for thumb targets, where there is no libc

+ 2 - 2
src/float/add.rs

@@ -184,11 +184,11 @@ macro_rules! add {
 add!(__addsf3: f32);
 add!(__adddf3: f64);
 
-// NOTE(cfg) for some reason, on arm-unknown-linux-gnueabi*, our implementation doesn't
+// NOTE(cfg) for some reason, on arm*-unknown-linux-gnueabi*, our implementation doesn't
 // match the output of its gcc_s or compiler-rt counterpart. Until we investigate further, we'll
 // just avoid testing against them on those targets. Do note that our implementation gives the
 // correct answer; gcc_s and compiler-rt are incorrect in this case.
-#[cfg(all(test, not(gnueabi)))]
+#[cfg(all(test, not(arm_linux)))]
 mod tests {
     use core::{f32, f64};
     use qc::{F32, F64};