[PATCH] D105191: [Clang][OpenMP] Add support for Static Device Libraries

Saiyedul Islam via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 26 01:29:57 PDT 2021


saiislam marked 5 inline comments as done.
saiislam added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:7674-7687
+    StringRef GPUArchName;
+    if ((CurKind == Action::OFK_OpenMP)) {
+      // Extract GPUArch from -march argument in TC argument list.
+      for (uint ArgIndex = 0; ArgIndex < TCArgs.size(); ArgIndex++) {
+        StringRef ArchStr = StringRef(TCArgs.getArgString(ArgIndex));
+        auto Arch = ArchStr.startswith_insensitive("-march=");
+        if (Arch) {
----------------
It will be replaced with a method invocation to get GPUArch in an upcoming patch to support multi-architecture compilation.


================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:1689
+                       : "lib" + libname + "-" + archname + "-" + gpuname,
+          "a");
+
----------------
grokos wrote:
> "a" --> ".a" (add a dot)
"a" is second argument of GetTemporayPath and doesn't the prefix "."


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105191



More information about the cfe-commits mailing list