[PATCH] D105191: [Clang][OpenMP] Add support for Static Device Libraries
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 23 13:43:29 PDT 2021
tra added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:1599-1618
+ // For bitcode SDL, search for these 12 relative SDL filenames
+ SDLs.push_back(
+ Twine("/libdevice/libbc-" + Lib + "-" + Arch + "-" + Target + ".a")
+ .str());
+ SDLs.push_back(
+ Twine("/libbc-" + Lib + "-" + Arch + "-" + Target + ".a").str());
+ SDLs.push_back(Twine("/libdevice/libbc-" + Lib + "-" + Arch + ".a").str());
----------------
This could probably be collapsed into a couple of nested loops:
```
for (auto base: {"/libbc-", "/lib"}) {
std::string ext = base == "/lib" ? ".bc" : ".a";
for( auto suffix : {Lib + "-" + Arch + "-" + Target, Lib + "-" + Arch, Lib } }) {
SDLs.append({"/libdevice" + base + suffix + ext, base + suffix + ext })
}
}
```
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