[PATCH] D15596: Add -L/path/to/cuda/lib if any of our inputs are CUDA files.
Artem Belevich via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 6 14:35:25 PST 2016
tra accepted this revision.
tra added a comment.
This revision is now accepted and ready to land.
Minor nit, but looks good otherwise.
================
Comment at: include/clang/Driver/Options.td:1636
@@ -1635,1 +1635,3 @@
+def nocudalib : Flag<["-"], "nocudalib">,
+ HelpText<"Don't link with libraries necessary for running CUDA (-L/path/to/cuda/lib{,64} -lcudart_static -lrt -lpthread -ldl)">;
def nocudalibdevice : Flag<["-"], "nocudalibdevice">,
----------------
Implementation details may be different on different platforms. I.e. you may need to link with different set of libraries if/when we add missing bits for windows and your help string will make no sense there.
Specifics should be in the documentation, IMO.
================
Comment at: lib/Driver/ToolChains.cpp:4130
@@ +4129,3 @@
+ LDArgs.push_back(DriverArgs.MakeArgString(CudaInstallation.getLibPath()));
+ for (const char *Flag : {"-lcudart_static", "-ldl", "-lrt", "-lpthread"}) {
+ LDArgs.push_back(DriverArgs.MakeArgString(Flag));
----------------
{}, again.
:-)
http://reviews.llvm.org/D15596
More information about the cfe-commits
mailing list