mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 19:17:43 +00:00
Auto merge of #39379 - segevfiner:fix-backtraces-on-i686-pc-windows-gnu, r=alexcrichton
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++. See discussion in: #39234 Closes: #28218
This commit is contained in:
commit
24055d0f2a
@ -14,6 +14,7 @@ pub fn target() -> TargetResult {
|
|||||||
let mut base = super::windows_base::opts();
|
let mut base = super::windows_base::opts();
|
||||||
base.cpu = "pentium4".to_string();
|
base.cpu = "pentium4".to_string();
|
||||||
base.max_atomic_width = Some(64);
|
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
|
// Mark all dynamic libraries and executables as compatible with the larger 4GiB address
|
||||||
// space available to x86 Windows binaries on x86_64.
|
// space available to x86 Windows binaries on x86_64.
|
||||||
|
@ -37,7 +37,6 @@ macro_rules! dump_and_die {
|
|||||||
target_os = "ios",
|
target_os = "ios",
|
||||||
target_os = "android",
|
target_os = "android",
|
||||||
all(target_os = "linux", target_arch = "arm"),
|
all(target_os = "linux", target_arch = "arm"),
|
||||||
all(target_os = "windows", target_pointer_width = "32"),
|
|
||||||
target_os = "freebsd",
|
target_os = "freebsd",
|
||||||
target_os = "dragonfly",
|
target_os = "dragonfly",
|
||||||
target_os = "bitrig",
|
target_os = "bitrig",
|
||||||
|
@ -104,10 +104,6 @@ fn runtest(me: &str) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
if cfg!(windows) && cfg!(target_env = "gnu") && cfg!(target_pointer_width = "32") {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
let args: Vec<String> = env::args().collect();
|
let args: Vec<String> = env::args().collect();
|
||||||
if args.len() >= 2 && args[1] == "fail" {
|
if args.len() >= 2 && args[1] == "fail" {
|
||||||
foo();
|
foo();
|
||||||
|
Loading…
Reference in New Issue
Block a user