]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_target/src/spec/thumb_base.rs
Apply c_enum_min_bits = 8 to (arm|thumb)-none- platforms
[rust.git] / compiler / rustc_target / src / spec / thumb_base.rs
index bac1203980eb010720829fe3570be0bcb8a20497..e2e528561e79719c9a78f8d29b26c394fa0ba584 100644 (file)
@@ -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()
     }
 }