[PATCH] D118944: [OpenMP] Add Cuda path to linker wrapper tool
Michael Kruse via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 3 14:00:30 PST 2022
Meinersbur added a comment.
Thanks for the fix
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8151-8152
const char *LinkingOutput) const {
+ const auto &D = getToolChain().getDriver();
+ const auto TheTriple = getToolChain().getTriple();
+ auto OpenMPTCRange = C.getOffloadToolChains<Action::OFK_OpenMP>();
----------------
[style] Avoid "Almost Always Auto"
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8161-8162
+ if (CudaInstallation.isValid())
+ CmdArgs.push_back(Args.MakeArgString(
+ "-cuda-path=" + CudaInstallation.getInstallPath()));
+ }
----------------
Since there is no `break`, would this potentially add multiple `--cuda-path`?
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8183
const ToolChain *TC = I.second;
- const Driver &D = TC->getDriver();
+ const Driver &TCDriver = TC->getDriver();
const ArgList &TCArgs = C.getArgsForToolChain(TC, "", Action::OFK_OpenMP);
----------------
[nit] unrelated rename
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8258-8261
+ // Construct the link job so we can wrap around it.
+ Linker->ConstructJob(C, JA, Output, Inputs, Args, LinkingOutput);
+ const auto &LinkCommand = C.getJobs().getJobs().back();
+
----------------
Is moving this relevant?
================
Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:102-103
PtxasArgs("ptxas-args", cl::ZeroOrMore,
- cl::desc("Argument to pass to the ptxas invocation"),
- cl::cat(ClangLinkerWrapperCategory));
----------------
[nit] unrelated whitespace change
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118944/new/
https://reviews.llvm.org/D118944
More information about the cfe-commits
mailing list