Fix backtraces on i686-pc-windows-gnu by disabling FPO

This might have performance implications. But do note that MSVC
disables FPO by default nowadays and it's use is limited in exception
heavy languages like C++.

Closes: #28218
This commit is contained in:
Segev Finer 2017-01-28 21:54:59 +02:00
parent f39f273826
commit 3f1d3948d6
3 changed files with 1 additions and 5 deletions

View file

@ -14,6 +14,7 @@ pub fn target() -> TargetResult {
let mut base = super::windows_base::opts();
base.cpu = "pentium4".to_string();
base.max_atomic_width = Some(64);
base.eliminate_frame_pointer = false; // Required for backtraces
// Mark all dynamic libraries and executables as compatible with the larger 4GiB address
// space available to x86 Windows binaries on x86_64.

View file

@ -37,7 +37,6 @@ macro_rules! dump_and_die {
target_os = "ios",
target_os = "android",
all(target_os = "linux", target_arch = "arm"),
all(target_os = "windows", target_pointer_width = "32"),
target_os = "freebsd",
target_os = "dragonfly",
target_os = "bitrig",

View file

@ -104,10 +104,6 @@ fn runtest(me: &str) {
}
fn main() {
if cfg!(windows) && cfg!(target_env = "gnu") && cfg!(target_pointer_width = "32") {
return
}
let args: Vec<String> = env::args().collect();
if args.len() >= 2 && args[1] == "fail" {
foo();