[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:21 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");
----------------
ellishg wrote:

Let's make this a warning so the flag is still supported. Also, these flag still need to set `config->irpgoProfilePath` and `config->bpStartupFunctionSort` so they still work.
```suggestion
    warn("--irpgo-profile-sort is deprecated. Please use "
          "--bp-startup-sort=function");
```

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


More information about the llvm-commits mailing list