File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -1680,11 +1680,13 @@ cargo-features = ["open-namespaces"]
1680
1680
* Tracking Issue: [ #16042 ] ( https://github.com/rust-lang/cargo/issues/16042 )
1681
1681
* Upstream Tracking Issue: [ rust-lang/rust #147286 ] ( https://github.com/rust-lang/rust/issues/147286 )
1682
1682
1683
- Allow use of [ ` -Cpanic=immediate-abort ` ] ( ../../rustc/codegen-options/index.html# panic) through a Cargo profile
1684
-
1683
+ Extends the ` panic ` profile setting to support the
1684
+ [ ` immediate-abort ` ] ( ../../rustc/codegen-options/index.html#panic ) panic strategy.
1685
1685
This can be enabled like so:
1686
+
1686
1687
``` toml
1687
- cargo-features = [" immediate-abort" ]
1688
+ # Cargo.toml
1689
+ cargo-features = [" panic-immediate-abort" ]
1688
1690
1689
1691
[package ]
1690
1692
# ...
@@ -1693,6 +1695,20 @@ cargo-features = ["immediate-abort"]
1693
1695
panic = " immediate-abort"
1694
1696
```
1695
1697
1698
+ To set this in a profile in Cargo configuration,
1699
+ you need to use either ` -Z panic-immediate-abort ` CLI flag
1700
+ or the ` [unstable] ` table to enable it.
1701
+ For example,
1702
+
1703
+ ``` toml
1704
+ # .cargo/config.toml
1705
+ [unstable ]
1706
+ panic-immediate-abort = true
1707
+
1708
+ [profile .release ]
1709
+ panic = " immediate-abort"
1710
+ ```
1711
+
1696
1712
## ` [lints.cargo] `
1697
1713
1698
1714
* Tracking Issue: [ #12235 ] ( https://github.com/rust-lang/cargo/issues/12235 )
You can’t perform that action at this time.
0 commit comments