mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 00:20:40 +03:00
Don't push -L-l/-L-L using -Xlinker.
This commit is contained in:
parent
34e1415f35
commit
30aba033c8
1 changed files with 5 additions and 1 deletions
|
@ -188,7 +188,11 @@ int linkObjToBinaryGcc(bool sharedLib)
|
||||||
for (unsigned i = 0; i < global.params.linkswitches->dim; i++)
|
for (unsigned i = 0; i < global.params.linkswitches->dim; i++)
|
||||||
{
|
{
|
||||||
char *p = static_cast<char *>(global.params.linkswitches->data[i]);
|
char *p = static_cast<char *>(global.params.linkswitches->data[i]);
|
||||||
args.push_back("-Xlinker");
|
// Don't push -l and -L switches using -Xlinker, but pass them directly
|
||||||
|
// to GCC. This makes sure user-defined paths take precedence over
|
||||||
|
// GCC's builtin LIBRARY_PATHs.
|
||||||
|
if (!p[0] || !(p[0] == '-' && (p[1] == 'l' || p[1] == 'L')))
|
||||||
|
args.push_back("-Xlinker");
|
||||||
args.push_back(p);
|
args.push_back(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue