mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-20 02:39:02 +02:00
Fixed #65 — Renaming shared lib
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user