mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 00:23:14 +01:00
Pass library file arguments to linker _before_ custom switches.
This allows specifying a static D library specified at the LDC command line to pick up symbols from druntime/Phobos. Fixes DMD testcase 'test39'.
This commit is contained in:
@@ -83,6 +83,13 @@ int linkObjToBinary(bool sharedLib)
|
||||
args.push_back(p);
|
||||
}
|
||||
|
||||
// user libs
|
||||
for (unsigned i = 0; i < global.params.libfiles->dim; i++)
|
||||
{
|
||||
char *p = static_cast<char *>(global.params.libfiles->data[i]);
|
||||
args.push_back(p);
|
||||
}
|
||||
|
||||
// output filename
|
||||
std::string output;
|
||||
if (!sharedLib && global.params.exefile)
|
||||
@@ -147,13 +154,6 @@ int linkObjToBinary(bool sharedLib)
|
||||
args.push_back(p);
|
||||
}
|
||||
|
||||
// user libs
|
||||
for (unsigned i = 0; i < global.params.libfiles->dim; i++)
|
||||
{
|
||||
char *p = static_cast<char *>(global.params.libfiles->data[i]);
|
||||
args.push_back(p);
|
||||
}
|
||||
|
||||
// default libs
|
||||
bool addSoname = false;
|
||||
switch(global.params.os) {
|
||||
|
||||
Reference in New Issue
Block a user