Skip to content

Commit

Permalink
Don't inherit the /Oy flag for 64-bit targets (#1330)
Browse files Browse the repository at this point in the history
  • Loading branch information
clubby789 authored Dec 22, 2024
1 parent 9138052 commit ed54aa6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
}
}
Expand Down

0 comments on commit ed54aa6

Please sign in to comment.