Skip to content

Commit

Permalink
Improve std feature flag in README
Browse files Browse the repository at this point in the history
Sorry, my previous example was hardcoded for `std`, but in theory this flag could be used also for core/alloc, if some people want to only rebuild these libstd crates. Using just `optimize_for_size` should be more rgeneral.
  • Loading branch information
Kobzol authored Jun 14, 2024
1 parent 63a7b92 commit 20ed26b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ host: x86_64-apple-darwin
# Add the =std,panic_abort to the option to make panic = "abort" Cargo.toml option work.
# See: https://github.com/rust-lang/wg-cargo-std-aware/issues/56
$ RUSTFLAGS="-Zlocation-detail=none" cargo +nightly build -Z build-std=std,panic_abort \
-Z build-std-features="std/optimize_for_size" \
-Z build-std-features="optimize_for_size" \
--target x86_64-apple-darwin --release
```

Expand Down

0 comments on commit 20ed26b

Please sign in to comment.