[clang] [Flang] Link `-lflang_rt.runtime` if available on the device (PR #132737)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 24 07:19:36 PDT 2025
================
@@ -9337,6 +9337,11 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back(
Args.MakeArgString("--device-linker=" + TC.getTripleString() + "=" +
"-lclang_rt.builtins"));
+ bool HasFlangRT = HasCompilerRT && C.getDriver().IsFlangMode();
+ if (HasCompilerRT)
----------------
jhuber6 wrote:
Don't know how I missed that.
https://github.com/llvm/llvm-project/pull/132737
More information about the cfe-commits
mailing list