Skip to content

Commit 579266a

Browse files
committed
Add flag to std and alloc too
1 parent 1d1981b commit 579266a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

library/alloc/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,5 @@ compiler-builtins-mangled-names = ["compiler_builtins/mangled-names"]
3838
compiler-builtins-weak-intrinsics = ["compiler_builtins/weak-intrinsics"]
3939
# Make panics and failed asserts immediately abort without formatting any message
4040
panic_immediate_abort = []
41+
# Choose algorithms that are optimized for binary size instead of runtime performance
42+
optimize_for_size = []

library/std/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ system-llvm-libunwind = ["unwind/system-llvm-libunwind"]
8181

8282
# Make panics and failed asserts immediately abort without formatting any message
8383
panic_immediate_abort = ["core/panic_immediate_abort", "alloc/panic_immediate_abort"]
84+
# Choose algorithms that are optimized for binary size instead of runtime performance
85+
optimize_for_size = ["core/optimize_for_size", "alloc/optimize_for_size"]
8486

8587
# Enable std_detect default features for stdarch/crates/std_detect:
8688
# https://github.com/rust-lang/stdarch/blob/master/crates/std_detect/Cargo.toml

0 commit comments

Comments
 (0)