[PATCH] D30087: [Driver] Unify linking of OpenMP runtime

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 17 10:40:22 PST 2017


Hahnfeld added inline comments.


================
Comment at: lib/Driver/Tools.cpp:8683
   if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs))
-    addOpenMPRuntime(CmdArgs, getToolChain(), Args);
+    addOpenMPRuntime(CmdArgs, getToolChain(), Args, JA);
 
----------------
pirama wrote:
> `addOpenMPRuntime` would add `-lomptarget` even for this call if JA satisfies the newly added check.  That's a deviation from exisiting behavior.  Am I missing some invariant here where `JobAction`s along this path don't have an offloading action?
Right, as I noted in the summary: `This enables libomptarget for Darwin, FreeBSD and NetBSD`

I don't see a problem with that, it's rather an inconsistency in the current code.


https://reviews.llvm.org/D30087





More information about the cfe-commits mailing list