about summary refs log tree commit diff
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-03-03 18:45:44 +0800
committerGitHub <noreply@github.com>2018-03-03 18:45:44 +0800
commitae6fe8f283503277504fa60171224d5035549988 (patch)
tree3463a715f7b82e51a1bd6be5f08c8181b8025c66
parent65f48a4edf62b3c95cb504fd9ce9dfe0c0364a10 (diff)
parent8e4ad29cb9cc74bf44486f4507f36df70d495187 (diff)
downloadrust-ae6fe8f283503277504fa60171224d5035549988.tar.gz
rust-ae6fe8f283503277504fa60171224d5035549988.zip
Rollup merge of #48466 - sanxiyn:no-neon, r=alexcrichton
Disable NEON on musl ARMv7

`armv7-unknown-linux-musleabihf` target diverged a bit from `armv7-unknown-linux-gnueabihf` target. This PR re-syncs them.

Fix #47765.
-rw-r--r--src/librustc_back/target/armv7_unknown_linux_musleabihf.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/librustc_back/target/armv7_unknown_linux_musleabihf.rs b/src/librustc_back/target/armv7_unknown_linux_musleabihf.rs
index a36e26c0b7d..88f2b596751 100644
--- a/src/librustc_back/target/armv7_unknown_linux_musleabihf.rs
+++ b/src/librustc_back/target/armv7_unknown_linux_musleabihf.rs
@@ -12,13 +12,7 @@ use LinkerFlavor;
 use target::{Target, TargetOptions, TargetResult};
 
 pub fn target() -> TargetResult {
-    let mut base = super::linux_musl_base::opts();
-
-    // Most of these settings are copied from the armv7_unknown_linux_gnueabihf
-    // target.
-    base.features = "+v7,+vfp3,+neon".to_string();
-    base.cpu = "cortex-a8".to_string();
-    base.max_atomic_width = Some(64);
+    let base = super::linux_musl_base::opts();
     Ok(Target {
         // It's important we use "gnueabihf" and not "musleabihf" here. LLVM
         // uses it to determine the calling convention and float ABI, and LLVM
@@ -33,9 +27,15 @@ pub fn target() -> TargetResult {
         target_env: "musl".to_string(),
         target_vendor: "unknown".to_string(),
         linker_flavor: LinkerFlavor::Gcc,
+
+        // Most of these settings are copied from the armv7_unknown_linux_gnueabihf
+        // target.
         options: TargetOptions {
+            features: "+v7,+vfp3,+d16,+thumb2,-neon".to_string(),
+            cpu: "generic".to_string(),
+            max_atomic_width: Some(64),
             abi_blacklist: super::arm_base::abi_blacklist(),
             .. base
-        },
+        }
     })
 }