about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/alloc/Cargo.toml2
-rw-r--r--library/std/Cargo.toml2
2 files changed, 4 insertions, 0 deletions
diff --git a/library/alloc/Cargo.toml b/library/alloc/Cargo.toml
index e8afed6b35a..4548a27b420 100644
--- a/library/alloc/Cargo.toml
+++ b/library/alloc/Cargo.toml
@@ -38,3 +38,5 @@ compiler-builtins-mangled-names = ["compiler_builtins/mangled-names"]
 compiler-builtins-weak-intrinsics = ["compiler_builtins/weak-intrinsics"]
 # Make panics and failed asserts immediately abort without formatting any message
 panic_immediate_abort = []
+# Choose algorithms that are optimized for binary size instead of runtime performance
+optimize_for_size = []
diff --git a/library/std/Cargo.toml b/library/std/Cargo.toml
index 52729ba1f84..81fd26692a5 100644
--- a/library/std/Cargo.toml
+++ b/library/std/Cargo.toml
@@ -81,6 +81,8 @@ system-llvm-libunwind = ["unwind/system-llvm-libunwind"]
 
 # Make panics and failed asserts immediately abort without formatting any message
 panic_immediate_abort = ["core/panic_immediate_abort", "alloc/panic_immediate_abort"]
+# Choose algorithms that are optimized for binary size instead of runtime performance
+optimize_for_size = ["core/optimize_for_size", "alloc/optimize_for_size"]
 
 # Enable std_detect default features for stdarch/crates/std_detect:
 # https://github.com/rust-lang/stdarch/blob/master/crates/std_detect/Cargo.toml