[PATCH] D126226: [OpenMP] Add `-Xoffload-linker` to forward input to the device linker

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 23 15:39:33 PDT 2022


tra added inline comments.


================
Comment at: clang/include/clang/Driver/Options.td:826
   Group<Link_Group>;
+def Xoffload_linker : Separate<["-"], "Xoffload-linker">,
+  HelpText<"Pass <arg> to the offload linker">, MetaVarName<"<arg>">,
----------------
This option still stands out as a sore thumb.

Could we fold it into the one below as `-Xoffload-linker-all` ?

Or, maybe make `Xoffload_linker_arg` use `"Xoffload-linker"` prefix and then check that the first argument is either empty (which would meand "for all") or "-<target>".

Maybe we don't even need separate "-Xoffload_linker" option(s). I wonder if it would make sense to extend the existing `-Xlinker` and use `-Xlinker-<target>` ?



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126226/new/

https://reviews.llvm.org/D126226



More information about the cfe-commits mailing list