bjorn3 opened PR #2218 from per_function_sections
to main
:
This makes it possible for the linker to omit unused functions when --gc-sections is passed.
For cg_clif the executable size savings are quite big. One example is 26MB when a single
.text
section is used, but 15MB when a single section for each function is used, which is the same as when compiled using cg_llvm. I will probably disable this in debug mode though as it significantly increases the linking time.The same could be done for data objects. I will try how much it helps for them.
pchickey submitted PR Review.
pchickey merged PR #2218.
Last updated: Dec 23 2024 at 12:05 UTC