mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 00:20:40 +03:00
Fixed #65 — Renaming shared lib
This commit is contained in:
parent
8df15e7b64
commit
fb5618e336
2 changed files with 21 additions and 16 deletions
|
@ -262,21 +262,23 @@ int linkObjToBinary(bool sharedLib)
|
|||
output = FileName::removeExt((char*)global.params.objfiles->data[0]);
|
||||
else
|
||||
output = "a.out";
|
||||
|
||||
if (sharedLib) {
|
||||
std::string libExt = std::string(".") + global.dll_ext;
|
||||
if (!endsWith(output, libExt))
|
||||
{
|
||||
if (global.params.os != OSWindows)
|
||||
output = "lib" + output + libExt;
|
||||
else
|
||||
output.append(libExt);
|
||||
}
|
||||
args.push_back("-shared");
|
||||
} else if (global.params.os == OSWindows && !endsWith(output, ".exe")) {
|
||||
output.append(".exe");
|
||||
}
|
||||
}
|
||||
|
||||
if (sharedLib) {
|
||||
std::string libExt = std::string(".") + global.dll_ext;
|
||||
if (!endsWith(output, libExt))
|
||||
{
|
||||
if (global.params.os != OSWindows)
|
||||
output = "lib" + output + libExt;
|
||||
else
|
||||
output.append(libExt);
|
||||
}
|
||||
args.push_back("-shared");
|
||||
} else if (global.params.os == OSWindows && !endsWith(output, ".exe")) {
|
||||
output.append(".exe");
|
||||
}
|
||||
|
||||
|
||||
args.push_back("-o");
|
||||
args.push_back(output.c_str());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue