mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
When -link-as-library, add -l options to Module's deplibs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18617 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -176,10 +176,17 @@ int main(int argc, char **argv, char **envp) {
|
|||||||
std::auto_ptr<Module> Composite(0);
|
std::auto_ptr<Module> Composite(0);
|
||||||
|
|
||||||
if (LinkAsLibrary) {
|
if (LinkAsLibrary) {
|
||||||
// Link in only the files, we ignore libraries in this case.
|
// Link in only the files.
|
||||||
Composite.reset( new Module(argv[0]) );
|
Composite.reset( new Module(argv[0]) );
|
||||||
if (LinkFiles(argv[0], Composite.get(), InputFilenames, Verbose))
|
if (LinkFiles(argv[0], Composite.get(), InputFilenames, Verbose))
|
||||||
return 1; // Error already printed
|
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 {
|
} else {
|
||||||
// Build a list of the items from our command line
|
// Build a list of the items from our command line
|
||||||
LinkItemList Items;
|
LinkItemList Items;
|
||||||
|
@@ -397,10 +397,17 @@ int main(int argc, char **argv, char **envp) {
|
|||||||
std::auto_ptr<Module> Composite(0);
|
std::auto_ptr<Module> Composite(0);
|
||||||
|
|
||||||
if (LinkAsLibrary) {
|
if (LinkAsLibrary) {
|
||||||
// Link in only the files, we ignore libraries in this case.
|
// Link in only the files.
|
||||||
Composite.reset( new Module(argv[0]) );
|
Composite.reset( new Module(argv[0]) );
|
||||||
if (LinkFiles(argv[0], Composite.get(), InputFilenames, Verbose))
|
if (LinkFiles(argv[0], Composite.get(), InputFilenames, Verbose))
|
||||||
return 1; // Error already printed
|
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 {
|
} else {
|
||||||
// Build a list of the items from our command line
|
// Build a list of the items from our command line
|
||||||
LinkItemList Items;
|
LinkItemList Items;
|
||||||
|
Reference in New Issue
Block a user