mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-05 03:23:25 +00:00
Apply c_enum_min_bits = 8 to (arm|thumb)-none- platforms
This commit is contained in:
parent
fd116c806a
commit
4c0e424461
@ -20,6 +20,8 @@ pub fn target() -> Target {
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
max_atomic_width: Some(32),
|
||||
emit_debug_gdb_scripts: false,
|
||||
// GCC and Clang default to 8 for arm-none here
|
||||
c_enum_min_bits: 8,
|
||||
..Default::default()
|
||||
},
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ pub fn target() -> Target {
|
||||
features: "+vfp3,-d32,-fp16".to_string(),
|
||||
max_atomic_width: Some(32),
|
||||
emit_debug_gdb_scripts: false,
|
||||
// GCC and Clang default to 8 for arm-none here
|
||||
c_enum_min_bits: 8,
|
||||
..Default::default()
|
||||
},
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ pub fn target() -> Target {
|
||||
max_atomic_width: Some(64),
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
emit_debug_gdb_scripts: false,
|
||||
c_enum_min_bits: 8,
|
||||
..Default::default()
|
||||
};
|
||||
Target {
|
||||
|
@ -19,6 +19,8 @@ pub fn target() -> Target {
|
||||
max_atomic_width: Some(64),
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
emit_debug_gdb_scripts: false,
|
||||
// GCC and Clang default to 8 for arm-none here
|
||||
c_enum_min_bits: 8,
|
||||
..Default::default()
|
||||
};
|
||||
Target {
|
||||
|
@ -19,6 +19,8 @@ pub fn target() -> Target {
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
max_atomic_width: Some(32),
|
||||
emit_debug_gdb_scripts: false,
|
||||
// GCC and Clang default to 8 for arm-none here
|
||||
c_enum_min_bits: 8,
|
||||
..Default::default()
|
||||
},
|
||||
}
|
||||
|
@ -20,6 +20,8 @@ pub fn target() -> Target {
|
||||
features: "+vfp3,-d32,-fp16".to_string(),
|
||||
max_atomic_width: Some(32),
|
||||
emit_debug_gdb_scripts: false,
|
||||
// GCC and Clang default to 8 for arm-none here
|
||||
c_enum_min_bits: 8,
|
||||
..Default::default()
|
||||
},
|
||||
}
|
||||
|
@ -53,6 +53,9 @@ pub fn opts() -> TargetOptions {
|
||||
// LLVM is eager to trash the link register when calling `noreturn` functions, which
|
||||
// breaks debugging. Preserve LR by default to prevent that from happening.
|
||||
frame_pointer: FramePointer::Always,
|
||||
// ARM supports multiple ABIs for enums, the linux one matches the default of 32 here
|
||||
// but any arm-none or thumb-none target will be defaulted to 8 on GCC and clang
|
||||
c_enum_min_bits: 8,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user