about summary refs log tree commit diff
path: root/library/std/src/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2022-01-25 18:16:17 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2022-01-26 15:13:55 +0100
commit99941cd9d26c3ef2d53ecdb4f7563367d66ca3c1 (patch)
treefc6e9bfa178720283fa27aa8d18d664171d2cf98 /library/std/src/sys/unix/stack_overflow.rs
parent5dc660b10647823842dfe3d8865b4802c7ab90f9 (diff)
downloadrust-99941cd9d26c3ef2d53ecdb4f7563367d66ca3c1.tar.gz
rust-99941cd9d26c3ef2d53ecdb4f7563367d66ca3c1.zip
Support -Zfunction-sections
This puts every function and data object in their own section. This
allows the linker to omit unused functions and data objects with
--gc-sections.

On linux this shrinks a hello world binary without optimizations
(neither sysroot nor binary) from 17MB to 13MB. It shrinks a hello world
binary with only sysroot optimizations from 14MB to 13MB. For comparison
cg_llvm produces a 3.5MB debug mode hello world binary with an optimized
sysroot. Cg_clif produces a 10MB debug mode hello world binary without
an optimized sysroot.
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions