[lld] [lld][ELF][MachO] rename to bp-* options for SectionOrderer (PR #118594)

Ellis Hoag via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 5 11:43:22 PST 2024


================
@@ -1838,34 +1838,44 @@ bool link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
       if (const Arg *arg = args.getLastArgNoClaim(OPT_call_graph_profile_sort))
         error(firstArgStr + " is incompatible with " + arg->getSpelling());
   };
-  if (const Arg *arg = args.getLastArg(OPT_irpgo_profile_sort)) {
-    config->irpgoProfileSortProfilePath = arg->getValue();
+  if (args.hasArg(OPT_irpgo_profile_sort) ||
+      args.hasArg(OPT_irpgo_profile_sort_eq))
+    error("--irpgo-profile-sort is deprecated. Please use "
+          "--bp-startup-sort=function");
+  if (const Arg *arg = args.getLastArg(OPT_irpgo_profile_eq)) {
+    config->irpgoProfilePath = arg->getValue();
     IncompatWithCGSort(arg->getSpelling());
----------------
ellishg wrote:

I'm open to discussion, but I think `-irpgo-profile=` could be compatible with CGSort. It's only if we also have `-bp-start-sort=function` where this is a problem, which is checked later.
```suggestion
```

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


More information about the llvm-commits mailing list