diff --git a/src/flags.rs b/src/flags.rs index 81834cf6..7040a3d8 100644 --- a/src/flags.rs +++ b/src/flags.rs @@ -296,8 +296,11 @@ impl<'this> RustcCodegenFlags<'this> { } // https://learn.microsoft.com/en-us/cpp/build/reference/oy-frame-pointer-omission if let Some(value) = self.force_frame_pointers { - let cc_flag = if value { "/Oy-" } else { "/Oy" }; - push_if_supported(cc_flag.into()); + // Flag is unsupported on 64-bit arches + if !target.arch.contains("64") { + let cc_flag = if value { "/Oy-" } else { "/Oy" }; + push_if_supported(cc_flag.into()); + } } } }