]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_target/src/spec/armv7a_none_eabi.rs
Address review comments
[rust.git] / compiler / rustc_target / src / spec / armv7a_none_eabi.rs
index 4199ac4569a7e81569cedc299e5a9ff7258b5bb9..742b403cff90cbfc09d9ae0108ce42bb9c0d7b75 100644 (file)
@@ -10,8 +10,8 @@
 // bare-metal binaries (the `gcc` linker has the advantage that it knows where C
 // libraries and crt*.o are but it's not much of an advantage here); LLD is also
 // faster
-// - `target_os` set to `none`. rationale: matches `thumb` targets
-// - `target_{env,vendor}` set to an empty string. rationale: matches `thumb`
+// - `os` set to `none`. rationale: matches `thumb` targets
+// - `env` and `vendor` are set to an empty string. rationale: matches `thumb`
 // targets
 // - `panic_strategy` set to `abort`. rationale: matches `thumb` targets
 // - `relocation-model` set to `static`; also no PIE, no relro and no dynamic
@@ -21,6 +21,8 @@
 
 pub fn target() -> Target {
     let opts = TargetOptions {
+        vendor: String::new(),
+        linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
         linker: Some("rust-lld".to_owned()),
         features: "+v7,+thumb2,+soft-float,-neon,+strict-align".to_string(),
         executables: true,
@@ -34,15 +36,9 @@ pub fn target() -> Target {
     };
     Target {
         llvm_target: "armv7a-none-eabi".to_string(),
-        target_endian: "little".to_string(),
         pointer_width: 32,
-        target_c_int_width: "32".to_string(),
-        target_os: "none".to_string(),
-        target_env: String::new(),
-        target_vendor: String::new(),
         data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
         arch: "arm".to_string(),
-        linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
         options: opts,
     }
 }