From b274b5f506a78d96d1a8971aaff93f72ebdc1893 Mon Sep 17 00:00:00 2001 From: FooIbar <118464521+FooIbar@users.noreply.github.com> Date: Fri, 3 Oct 2025 03:36:45 +0000 Subject: [PATCH] Fix regression of switching to new `panic=immediate-abort` flag --- .github/workflows/build.yml | 2 +- README.md | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd6fe40..cdcc0b7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,4 +76,4 @@ jobs: run: > rustup component add rust-src; 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; - RUSTFLAGS="-Zunstable-options -Cpanic=immediate-abort" cargo +nightly build -Z build-std=std,panic_abort --target x86_64-unknown-linux-gnu --release; + 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; diff --git a/README.md b/README.md index b99afed..f939890 100644 --- a/README.md +++ b/README.md @@ -230,11 +230,14 @@ and formatting code in final binary by default. has been merged into the `nightly` `rustc` compiler to address this. To use this, repeat the instructions above to use `build-std`, but also pass -[`-Zunstable-options -Cpanic=immediate-abort`](https://doc.rust-lang.org/rustc/command-line-arguments.html#-z-set-unstable-options) +[`-Zunstable-options -Cpanic=immediate-abort`](https://doc.rust-lang.org/rustc/command-line-arguments.html#-z-set-unstable-options) and +[`-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) to `rustc`. ```bash -$ RUSTFLAGS="-Zunstable-options -Cpanic=immediate-abort" cargo +nightly build -Z build-std=std,panic_abort \ +$ RUSTFLAGS="-Zunstable-options -Cpanic=immediate-abort" cargo +nightly build \ + -Z build-std=std,panic_abort \ + -Z build-std-features= \ --target x86_64-apple-darwin --release ```