Skip to content

Commit

Permalink
Merge pull request 55 from nickbabcock/fat-lot
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jan 20, 2024
2 parents 5f2f9b4 + f60df10 commit a9f6b34
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ enabled for the linker to deduce those do not panic.
lto = "thin"
```

If thin LTO isn't cutting it, the next thing to try would be fat LTO with a
single codegen unit:

```toml
[profile.release]
lto = "fat"
codegen-units = 1
```

If you want no\_panic to just assume that some function you call doesn't panic,
and get Undefined Behavior if it does at runtime, see [dtolnay/no-panic#16]; try
wrapping that call in an `unsafe extern "C"` wrapper.
Expand Down

0 comments on commit a9f6b34

Please sign in to comment.