[llvm] [llvm-size] Add -z option for Mach-O to exclude __PAGEZERO size. (PR #159574)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 23 01:59:26 PDT 2025


================
@@ -21,6 +21,8 @@ def grp_mach_o : OptionGroup<"kind">, HelpText<"OPTIONS (Mach-O specific)">;
 def arch_EQ : Joined<["--"], "arch=">, HelpText<"architecture(s) from a Mach-O file to dump">, Group<grp_mach_o>;
 def : Separate<["--", "-"], "arch">, Alias<arch_EQ>;
 def l : F<"l", "When format is darwin, use long format to include addresses and offsets">, Group<grp_mach_o>;
+def z : F<"z", "Do not include __PAGEZERO segment in totals">,
----------------
jh7370 wrote:

Is there a prior art for this specific option name? We usually avoid using short aliases for tools that are intended to mirror GNU tools, unless the option is already supported there. This avoids issues where the option is later added with a completely different meaning.

https://github.com/llvm/llvm-project/pull/159574


More information about the llvm-commits mailing list