Skip to content

Commit 24233f9

Browse files
authored
Fix regression of switching to new panic=immediate-abort flag (#87)
1 parent eae3cd5 commit 24233f9

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ jobs:
7676
run: >
7777
rustup component add rust-src;
7878
RUSTFLAGS="-Zlocation-detail=none -Zfmt-debug=none" cargo +nightly build -Z build-std=std,panic_abort -Z build-std-features="optimize_for_size" --target x86_64-unknown-linux-gnu --release;
79-
RUSTFLAGS="-Zunstable-options -Cpanic=immediate-abort" cargo +nightly build -Z build-std=std,panic_abort --target x86_64-unknown-linux-gnu --release;
79+
RUSTFLAGS="-Zunstable-options -Cpanic=immediate-abort" cargo +nightly build -Z build-std=std,panic_abort -Z build-std-features= --target x86_64-unknown-linux-gnu --release;

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,14 @@ and formatting code in final binary by default.
230230
has been merged into the `nightly` `rustc` compiler to address this.
231231

232232
To use this, repeat the instructions above to use `build-std`, but also pass
233-
[`-Zunstable-options -Cpanic=immediate-abort`](https://doc.rust-lang.org/rustc/command-line-arguments.html#-z-set-unstable-options)
233+
[`-Zunstable-options -Cpanic=immediate-abort`](https://doc.rust-lang.org/rustc/command-line-arguments.html#-z-set-unstable-options) and
234+
[`-Z build-std-features=`](https://doc.rust-lang.org/cargo/reference/unstable.html#build-std-features) (which will disable the default `backtrace` and `panic-unwind` features)
234235
to `rustc`.
235236

236237
```bash
237-
$ RUSTFLAGS="-Zunstable-options -Cpanic=immediate-abort" cargo +nightly build -Z build-std=std,panic_abort \
238+
$ RUSTFLAGS="-Zunstable-options -Cpanic=immediate-abort" cargo +nightly build \
239+
-Z build-std=std,panic_abort \
240+
-Z build-std-features= \
238241
--target x86_64-apple-darwin --release
239242
```
240243

0 commit comments

Comments
 (0)