Skip to content

Commit 4d2f98d

Browse files
authored
Rollup merge of #113992 - chrisnc:arm-none-fixups, r=oli-obk
arm-none fixups - Remove "-unknown" from `llvm_target` for arm\*v7r-none-eabi\* targets. - Remove redundant `c_enum_min_bits` option from the thumbv4t-none-eabi target. - Fix comments about GCC/Clang's enum width for arm-none targets. Previously part of #110482, which is a larger change to add a new target. These nits were found along the way.
2 parents 2660d5d + 8e54cab commit 4d2f98d

8 files changed

+12
-14
lines changed

compiler/rustc_target/src/spec/armebv7r_none_eabi.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, Targ
55

66
pub fn target() -> Target {
77
Target {
8-
llvm_target: "armebv7r-unknown-none-eabi".into(),
8+
llvm_target: "armebv7r-none-eabi".into(),
99
pointer_width: 32,
1010
data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
1111
arch: "arm".into(),
@@ -18,7 +18,7 @@ pub fn target() -> Target {
1818
panic_strategy: PanicStrategy::Abort,
1919
max_atomic_width: Some(64),
2020
emit_debug_gdb_scripts: false,
21-
// GCC and Clang default to 8 for arm-none here
21+
// GCC defaults to 8 for arm-none here.
2222
c_enum_min_bits: Some(8),
2323
..Default::default()
2424
},

compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, Targ
55

66
pub fn target() -> Target {
77
Target {
8-
llvm_target: "armebv7r-unknown-none-eabihf".into(),
8+
llvm_target: "armebv7r-none-eabihf".into(),
99
pointer_width: 32,
1010
data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
1111
arch: "arm".into(),
@@ -19,7 +19,7 @@ pub fn target() -> Target {
1919
features: "+vfp3,-d32,-fp16".into(),
2020
max_atomic_width: Some(64),
2121
emit_debug_gdb_scripts: false,
22-
// GCC and Clang default to 8 for arm-none here
22+
// GCC defaults to 8 for arm-none here.
2323
c_enum_min_bits: Some(8),
2424
..Default::default()
2525
},

compiler/rustc_target/src/spec/armv4t_none_eabi.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ pub fn target() -> Target {
3939
has_thumb_interworking: true,
4040
relocation_model: RelocModel::Static,
4141
panic_strategy: PanicStrategy::Abort,
42-
// from thumb_base, rust-lang/rust#44993.
42+
// From thumb_base, rust-lang/rust#44993.
4343
emit_debug_gdb_scripts: false,
44-
// from thumb_base, apparently gcc/clang give enums a minimum of 8 bits on no-os targets
44+
// From thumb_base, GCC gives enums a minimum of 8 bits on no-os targets.
4545
c_enum_min_bits: Some(8),
4646
..Default::default()
4747
},

compiler/rustc_target/src/spec/armv7a_none_eabihf.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub fn target() -> Target {
1818
max_atomic_width: Some(64),
1919
panic_strategy: PanicStrategy::Abort,
2020
emit_debug_gdb_scripts: false,
21-
// GCC and Clang default to 8 for arm-none here
21+
// GCC defaults to 8 for arm-none here.
2222
c_enum_min_bits: Some(8),
2323
..Default::default()
2424
};

compiler/rustc_target/src/spec/armv7r_none_eabi.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, Targ
44

55
pub fn target() -> Target {
66
Target {
7-
llvm_target: "armv7r-unknown-none-eabi".into(),
7+
llvm_target: "armv7r-none-eabi".into(),
88
pointer_width: 32,
99
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
1010
arch: "arm".into(),
@@ -17,7 +17,7 @@ pub fn target() -> Target {
1717
panic_strategy: PanicStrategy::Abort,
1818
max_atomic_width: Some(64),
1919
emit_debug_gdb_scripts: false,
20-
// GCC and Clang default to 8 for arm-none here
20+
// GCC defaults to 8 for arm-none here.
2121
c_enum_min_bits: Some(8),
2222
..Default::default()
2323
},

compiler/rustc_target/src/spec/armv7r_none_eabihf.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, Targ
44

55
pub fn target() -> Target {
66
Target {
7-
llvm_target: "armv7r-unknown-none-eabihf".into(),
7+
llvm_target: "armv7r-none-eabihf".into(),
88
pointer_width: 32,
99
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
1010
arch: "arm".into(),
@@ -18,7 +18,7 @@ pub fn target() -> Target {
1818
features: "+vfp3,-d32,-fp16".into(),
1919
max_atomic_width: Some(64),
2020
emit_debug_gdb_scripts: false,
21-
// GCC and Clang default to 8 for arm-none here
21+
// GCC defaults to 8 for arm-none here.
2222
c_enum_min_bits: Some(8),
2323
..Default::default()
2424
},

compiler/rustc_target/src/spec/thumb_base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub fn opts() -> TargetOptions {
5252
// breaks debugging. Preserve LR by default to prevent that from happening.
5353
frame_pointer: FramePointer::Always,
5454
// ARM supports multiple ABIs for enums, the linux one matches the default of 32 here
55-
// but any arm-none or thumb-none target will be defaulted to 8 on GCC and clang
55+
// but any arm-none or thumb-none target will be defaulted to 8 on GCC.
5656
c_enum_min_bits: Some(8),
5757
..Default::default()
5858
}

compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs

-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ pub fn target() -> Target {
4545
relocation_model: RelocModel::Static,
4646
// suggested from thumb_base, rust-lang/rust#44993.
4747
emit_debug_gdb_scripts: false,
48-
// suggested from thumb_base, with no-os gcc/clang use 8-bit enums
49-
c_enum_min_bits: Some(8),
5048
frame_pointer: FramePointer::MayOmit,
5149

5250
main_needs_argc_argv: false,

0 commit comments

Comments
 (0)