Skip to content

Commit 1c3c655

Browse files
authored
[lld-macho] Document '-icf' flag options (#123372)
Adding the `safe_thunks` option in `Options.td` as it was missing there - mentioned by @Colibrow in #106573 Also documenting what the various options mean. Help now looks like this: ``` .......... --error-limit=<value> Maximum number of errors to print before exiting (default: 20) --help-hidden Display help for hidden options --icf=[none,safe,safe_thunks,all] Set level for identical code folding (default: none). Possible values: none - Disable ICF safe - Only folds non-address significant functions (as described by `__addrsig` section) safe_thunks - Like safe, but replaces address-significant functions with thunks all - Fold all identical functions --ignore-auto-link-option=<value> Ignore a single auto-linked library or framework. Useful to ignore invalid options that ld64 ignores --irpgo-profile-sort=<profile> Deprecated. Please use --irpgo-profile and --bp-startup-sort=function .......... ```
1 parent f12e0c9 commit 1c3c655

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lld/MachO/Options.td

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,12 @@ def print_dylib_search: Flag<["--"], "print-dylib-search">,
8282
HelpText<"Print which paths lld searched when trying to find dylibs">,
8383
Group<grp_lld>;
8484
def icf_eq: Joined<["--"], "icf=">,
85-
HelpText<"Set level for identical code folding (default: none)">,
86-
MetaVarName<"[none,safe,all]">,
85+
HelpText<"Set level for identical code folding (default: none). Possible values:\n"
86+
" none - Disable ICF\n"
87+
" safe - Only folds non-address significant functions (as described by `__addrsig` section)\n"
88+
" safe_thunks - Like safe, but replaces address-significant functions with thunks\n"
89+
" all - Fold all identical functions">,
90+
MetaVarName<"[none,safe,safe_thunks,all]">,
8791
Group<grp_lld>;
8892
def keep_icf_stabs: Joined<["--"], "keep-icf-stabs">,
8993
HelpText<"Generate STABS entries for symbols folded by ICF. These entries can then be used by dsymutil to discover the address range where folded symbols are located.">,

0 commit comments

Comments
 (0)