[clang] [Clang] Handle `-flto-partitions` generically and forward it properly (PR #133283)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 27 11:48:16 PDT 2025
================
@@ -3043,6 +3041,8 @@ defm fat_lto_objects : BoolFOption<"fat-lto-objects",
PosFlag<SetTrue, [], [ClangOption, CC1Option], "Enable">,
NegFlag<SetFalse, [], [ClangOption, CC1Option], "Disable">,
BothFlags<[], [ClangOption, CC1Option], " fat LTO object support">>;
+def flto_partitions_EQ : Joined<["-"], "flto-partitions=">, Group<f_Group>,
----------------
jhuber6 wrote:
To my knowledge, `-f` flags tend to be for toggling specific non-standard behavior. They typically override as well. Most common are `-f` and `-fno` variants. Double dash `--` options tend to be more specific arguments for the driver itself and `-m` is for machine specific things. This option could reasonably be made `--lto-partitions`, but all of the other LTO related flags use `-flto` so it's consistent. Using `--flto` is definitely incorrect since it mixes them.
https://github.com/llvm/llvm-project/pull/133283
More information about the cfe-commits
mailing list