Skip to content

Commit ed54aa6

Browse files
authored
Don't inherit the /Oy flag for 64-bit targets (#1330)
1 parent 9138052 commit ed54aa6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/flags.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,11 @@ impl<'this> RustcCodegenFlags<'this> {
296296
}
297297
// https://learn.microsoft.com/en-us/cpp/build/reference/oy-frame-pointer-omission
298298
if let Some(value) = self.force_frame_pointers {
299-
let cc_flag = if value { "/Oy-" } else { "/Oy" };
300-
push_if_supported(cc_flag.into());
299+
// Flag is unsupported on 64-bit arches
300+
if !target.arch.contains("64") {
301+
let cc_flag = if value { "/Oy-" } else { "/Oy" };
302+
push_if_supported(cc_flag.into());
303+
}
301304
}
302305
}
303306
}

0 commit comments

Comments
 (0)