[clang] [Clang] Add a flag to include GPU startup files (PR #112025)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 25 15:58:16 PDT 2024
================
@@ -648,6 +648,17 @@ void amdgpu::Linker::ConstructJob(Compilation &C, const JobAction &JA,
Args.MakeArgString("-plugin-opt=-mattr=" + llvm::join(Features, ",")));
}
+ if (Args.hasArg(options::OPT_stdlib))
+ CmdArgs.append({"-lc", "-lm"});
+ if (Args.hasArg(options::OPT_startfiles)) {
+ auto IncludePath = getToolChain().getStdlibPath();
----------------
arsenm wrote:
no auto
https://github.com/llvm/llvm-project/pull/112025
More information about the cfe-commits
mailing list