[PATCH] D105191: [Clang][OpenMP] Add support for Static Device Libraries
George Rokos via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 9 10:29:26 PDT 2021
grokos added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:1689
+ : "lib" + libname + "-" + archname + "-" + gpuname,
+ "a");
+
----------------
"a" --> ".a" (add a dot)
================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:1796-1798
+ if (SDL_Name != "omp" && SDL_Name != "cudart" && SDL_Name != "m" &&
+ SDL_Name != "gcc" && SDL_Name != "gcc_s" && SDL_Name != "pthread" &&
+ SDL_Name != "hip_hcc") {
----------------
I'm with @jdoerfert here, you can use a set of library names which are known to not have device-specific SDLs and check whether that set contains `SDL_Name`. Also, `SDL_Names` can be a set of unique entries, this way even if you try to add the same library twice it won't be added. This quadratic-complexity loop looks ugly...
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