Skip to content

Commit

Permalink
Allow eliminating the frame pointer on x86_64-apple-darwin
Browse files Browse the repository at this point in the history
Quoting @alexcrichton:

> the fp elim here comes from the code contents of the patch:
>
> ```rust
>     // FIXME: rust-lang#11906: Omitting frame pointers breaks retrieving the value of a parameter.
>     // FIXME: rust-lang#11954: mac64 unwinding may not work with fp elim
>     let no_fp_elim = (sess.opts.debuginfo != NoDebugInfo) ||
>                      (sess.targ_cfg.os == abi::OsMacos &&
>                       sess.targ_cfg.arch == abi::X86_64);
> ```
>
>
> which points to rust-lang#11954 which
> I believe was [incorrectly closed][] (only references i686, not
> x86_64).
>
> This sounds vaguely familiar about how it's related to
> unwinding. This also is the definition of something lost to time
> which we unfortunately lost track of :(.
>
> [incorrectly closed]: rust-lang#11954 (comment)
  • Loading branch information
shepmaster committed Jul 21, 2020
1 parent f9a3086 commit 12712f1
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/librustc_target/spec/x86_64_apple_darwin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ pub fn target() -> TargetResult {
let mut base = super::apple_base::opts();
base.cpu = "core2".to_string();
base.max_atomic_width = Some(128); // core2 support cmpxchg16b
base.eliminate_frame_pointer = false;
base.pre_link_args.insert(LinkerFlavor::Gcc, vec!["-m64".to_string()]);
base.link_env_remove.extend(super::apple_base::macos_link_env_remove());
base.stack_probes = true;
Expand Down

0 comments on commit 12712f1

Please sign in to comment.