[PATCH] D123313: [OpenMP] Make clang argument handling for the new driver more generic

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 19 10:06:01 PDT 2022


jhuber6 added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6949-6952
+    CmdArgs.push_back(Args.MakeArgString(
+        "-fembed-offload-object=" + File + "," +
+        Action::GetOffloadKindName(OffloadAction->getOffloadingDeviceKind()) +
+        "," + TC->getTripleString() + "," + Arch));
----------------
yaxunl wrote:
> Linux path may contain ',' which cannot be passed by this option.
> 
> We've seen similar issues with -inputs= option of clang-offload-bundler. To solve that issue, we had to add support of multiple -input= options.
Ugh, you could probably split this starting from the end since we assume it will always end with at least three commas, but that's not a satisfying solution. I've been pondering creating a new tool to do this, but haven't quite decided how that should look. I'd imagine it would basically behave like how we invoke `fatbinary`.

This issue isn't related to this patch, so I'll probably just parse it in reverse upstream, thanks for bringing this up.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123313



More information about the cfe-commits mailing list