jlebar abandoned this revision.
jlebar added a comment.
> It just struck me that this patch may not be as useful as we'd like it to be.
Oh. Yes.
I guess I'll drop this and http://reviews.llvm.org/D15939. :(
http://reviews.llvm.org/D15596
___
cf
tra added inline comments.
Comment at: lib/Driver/Tools.cpp:276
@@ +275,3 @@
+
+ // Add -L/path/to/cuda/lib if any of our inputs are .cu files.
+ if (std::any_of(C.getActions().begin(), C.getActions().end(), isCudaAction))
It just struck me that this patch may n
jlebar updated this revision to Diff 44178.
jlebar added a comment.
Split out the bits adding an arg to AddLinkerInputs into a separate patch,
http://reviews.llvm.org/D15939.
http://reviews.llvm.org/D15596
Files:
include/clang/Driver/Options.td
include/clang/Driver/ToolChain.h
lib/Driver
jlebar updated this revision to Diff 44170.
jlebar marked 2 inline comments as done.
jlebar added a comment.
Address tra's review comments.
http://reviews.llvm.org/D15596
Files:
include/clang/Driver/Options.td
include/clang/Driver/ToolChain.h
lib/Driver/ToolChain.cpp
lib/Driver/ToolChai
jlebar added inline comments.
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
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 l
jlebar added inline comments.
Comment at: lib/Driver/ToolChains.cpp:4129-4137
@@ -4123,4 +4128,11 @@
+ LDArgs.push_back("-L");
+ LDArgs.push_back(DriverArgs.MakeArgString(CudaInstallation.getLibPath()));
+ for (const char *Flag : {"-lcudart_static", "-ldl", "-lrt", "-lpthread"}
jlebar updated this revision to Diff 44160.
jlebar added a comment.
Adding back testcase that ensures that our flags are added after user flags.
http://reviews.llvm.org/D15596
Files:
include/clang/Driver/Options.td
include/clang/Driver/ToolChain.h
lib/Driver/ToolChain.cpp
lib/Driver/Too
jlebar added a comment.
Updated code; please have a look.
Comment at: include/clang/Driver/Options.td:1636
@@ -1635,1 +1635,3 @@
+def nocudalib : Flag<["-"], "nocudalib">,
+ HelpText<"Don't include libraries necessary for running CUDA
(-L/path/to/cuda/lib{,64} -lcudart_static
jlebar updated this revision to Diff 44156.
jlebar marked 4 inline comments as done.
jlebar added a comment.
Address tra's review comments.
http://reviews.llvm.org/D15596
Files:
include/clang/Driver/Options.td
include/clang/Driver/ToolChain.h
lib/Driver/ToolChain.cpp
lib/Driver/ToolChai
tra added inline comments.
Comment at: include/clang/Driver/Options.td:1636
@@ -1635,1 +1635,3 @@
+def nocudalib : Flag<["-"], "nocudalib">,
+ HelpText<"Don't include libraries necessary for running CUDA
(-L/path/to/cuda/lib{,64} -lcudart_static -lrt -lpthread -ldl)">;
def nocu
jlebar marked an inline comment as done.
jlebar added a comment.
Done, please have another look.
http://reviews.llvm.org/D15596
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jlebar updated this revision to Diff 44145.
jlebar added a dependency: D15933: Rename -nocudalib to -nocudalibdevice..
jlebar added a comment.
Now also pass -lcudart_static -lcuda -ldl -lrt -pthread for CUDA compiles.
Depends on http://reviews.llvm.org/D15933.
http://reviews.llvm.org/D15596
Fi
jlebar added inline comments.
Comment at: lib/Driver/ToolChains.cpp:4125
@@ +4124,3 @@
+ ArgStringList &LDArgs) const {
+ if (DriverArgs.hasArg(options::OPT_nocudalib) || !CudaInstallation.isValid())
+return;
tra wrote:
> I'd rena
tra added inline comments.
Comment at: lib/Driver/ToolChains.cpp:4125
@@ +4124,3 @@
+ ArgStringList &LDArgs) const {
+ if (DriverArgs.hasArg(options::OPT_nocudalib) || !CudaInstallation.isValid())
+return;
I'd rename -nocudalib to
jlebar added a comment.
I'm sorry I sat on this for so long; I failed at email somehow, and only came
back to ping this patch. :)
Comment at: lib/Driver/ToolChains.cpp:4125
@@ +4124,3 @@
+ ArgStringList &LDArgs) const {
+ if (DriverArgs.hasArg(opt
jlebar updated this revision to Diff 44056.
jlebar marked 2 inline comments as done.
jlebar added a comment.
Address tra's review comments.
http://reviews.llvm.org/D15596
Files:
include/clang/Driver/ToolChain.h
lib/Driver/ToolChain.cpp
lib/Driver/ToolChains.cpp
lib/Driver/ToolChains.h
tra added inline comments.
Comment at: lib/Driver/Tools.cpp:259-261
@@ -249,1 +258,5 @@
+ // Add -L/path/to/cuda/lib if any of our inputs are .cu files.
+ if (std::any_of(C.getActions().begin(), C.getActions().end(), isCudaAction))
{
+TC.AddCudaLinkerArgs(Args, CmdArgs);
+
tra added a comment.
You also need a test case for the changes.
http://reviews.llvm.org/D15596
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tra added inline comments.
Comment at: lib/Driver/ToolChains.cpp:4125
@@ +4124,3 @@
+ ArgStringList &LDArgs) const {
+ if (DriverArgs.hasArg(options::OPT_nocudalib) || !CudaInstallation.isValid())
+return;
We may need a new option
20 matches
Mail list logo