mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 00:20:40 +03:00
modified gen/linker.cpp to only append .exe suffix on windows if not already present
This commit is contained in:
parent
512437d3e3
commit
4c3d23ddfe
1 changed files with 2 additions and 2 deletions
|
@ -72,7 +72,7 @@ int linkExecutable(const char* argv0)
|
||||||
else
|
else
|
||||||
exestr = "a.out";
|
exestr = "a.out";
|
||||||
}
|
}
|
||||||
if (global.params.os == OSWindows)
|
if (global.params.os == OSWindows && !(exestr.substr(exestr.length()-4) == ".exe"))
|
||||||
exestr.append(".exe");
|
exestr.append(".exe");
|
||||||
|
|
||||||
std::string outopt = "-o=" + exestr;
|
std::string outopt = "-o=" + exestr;
|
||||||
|
@ -240,7 +240,7 @@ int linkObjToExecutable(const char* argv0)
|
||||||
else
|
else
|
||||||
exestr = "a.out";
|
exestr = "a.out";
|
||||||
}
|
}
|
||||||
if (global.params.os == OSWindows)
|
if (global.params.os == OSWindows && !(exestr.rfind(".exe") == exestr.length()-4))
|
||||||
exestr.append(".exe");
|
exestr.append(".exe");
|
||||||
|
|
||||||
args.push_back("-o");
|
args.push_back("-o");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue