[llvm-commits] CVS: llvm/tools/gccld/gccld.cpp
Reid Spencer
reid at x10sys.com
Tue Dec 7 21:17:51 PST 2004
Changes in directory llvm/tools/gccld:
gccld.cpp updated: 1.83 -> 1.84
---
Log message:
When -link-as-library, add -l options to Module's deplibs
---
Diffs of the changes: (+8 -1)
Index: llvm/tools/gccld/gccld.cpp
diff -u llvm/tools/gccld/gccld.cpp:1.83 llvm/tools/gccld/gccld.cpp:1.84
--- llvm/tools/gccld/gccld.cpp:1.83 Sun Dec 5 13:15:17 2004
+++ llvm/tools/gccld/gccld.cpp Tue Dec 7 23:17:40 2004
@@ -176,10 +176,17 @@
std::auto_ptr<Module> Composite(0);
if (LinkAsLibrary) {
- // Link in only the files, we ignore libraries in this case.
+ // Link in only the files.
Composite.reset( new Module(argv[0]) );
if (LinkFiles(argv[0], Composite.get(), InputFilenames, Verbose))
return 1; // Error already printed
+ // The libraries aren't linked in but are noted as "dependent" in the
+ // module.
+ for (cl::list<std::string>::const_iterator I = Libraries.begin(),
+ E = Libraries.end(); I != E ; ++I) {
+ Composite.get()->addLibrary(*I);
+ }
+
} else {
// Build a list of the items from our command line
LinkItemList Items;
More information about the llvm-commits
mailing list