Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional linker flag icf={safe,all} to optimizations #20

Merged
merged 2 commits into from
Sep 5, 2021

Conversation

joebonrichie
Copy link
Contributor

@joebonrichie joebonrichie commented Aug 18, 2021

Identical code folding folds identical functions into a single copy, saving disk space.
Generally useful for large C++ applications.

Only the gold linker can handle icf when using the gcc toolchain, although icf is generally superior when using llvm/lld.

Also add support for function-sections, this is recommended for use with ICF when using gcc/gold but not strictly necessary.

icf-all is not recommended for gcc/gold but is left as an option. icf-all is generally safe for clang/lld due to -faddrsig being default in clang.

Additionally, fix a thinko where runpath wasn't being filtered from cflags/cxxflags.

Identical code folding folds identical functions into a single copy, saving disk space.
Generally useful for large C++ applications.

Only the gold linker can handle icf when using the gcc toolchain,
although icf is generally superior when using llvm/lld.

Additionally, fix a thinko where runpath wasn't being filtered from cflags/cxxflags.
Recommended in combination with ICF when using GCC toolchain, otherwise
not recommended. However, there may be a use for it so leave it as a
seperate option.
@JoshStrobl JoshStrobl merged commit d78c50c into getsolus:master Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants