[clang] [Clang] Make the GPU toolchains implicitly link `-lm` and `-lc` (PR #98170)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 9 09:19:58 PDT 2024
================
@@ -633,6 +633,17 @@ void amdgpu::Linker::ConstructJob(Compilation &C, const JobAction &JA,
else if (Args.hasArg(options::OPT_mcpu_EQ))
CmdArgs.push_back(Args.MakeArgString(
"-plugin-opt=mcpu=" + Args.getLastArgValue(options::OPT_mcpu_EQ)));
+
----------------
jhuber6 wrote:
So, I wasn't sure if I should also apply this to HIP / CUDA stuff just yet. HIP doesn't pass LTO bitcode to the linker, so we can't do a full link with the library. CUDA doesn't even invoke the linker either. I think in the future it would be nice to provide these to HIP and CUDA by default however.
https://github.com/llvm/llvm-project/pull/98170
More information about the cfe-commits
mailing list