jhuber6 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>">,
----------------
tra wrote:
> 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>` ?
> 
I don't think we could rework `-Xlinker` as it works by forwarding the 
arguments to the linker job, this requires some handling inside of Clang to 
format it properly. But I should definitely make it a single argument by just 
checking if the joined argument is empty.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126226

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to