Skip to content

Commit

Permalink
chore: Use ld_classic when linking on mac
Browse files Browse the repository at this point in the history
I was having some issues with panics not showing backtraces, and instead showing
the following:

```
libunwind: stepWithCompactEncoding - invalid compact unwind encoding
```

This seems to be from the latest mac update using a new linker. See rust-lang/rust#113783

As an aside, I think might have an errant panic somewhere that's not getting
bubbled up properly.
  • Loading branch information
scsmithr committed Oct 27, 2023
1 parent 494b79a commit 5e4fab1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
[alias]
xtask = "run --bin xtask --"

[target."aarch64-apple-darwin"]
# Get proper backtraces in mac Sonoma. Currently there's an issue with the new
# linker that prevents backtraces from getting printed correctly.
#
# <https://github.com/rust-lang/rust/issues/113783>
rustflags=["-Clink-arg=-Wl,-ld_classic"]

0 comments on commit 5e4fab1

Please sign in to comment.