mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-24 04:32:09 +00:00
Add an "exe" suffix only if the output file has no suffix at all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52289 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fc19988bcb
commit
48cca1fd46
@ -532,17 +532,17 @@ int main(int argc, char **argv, char **envp) {
|
||||
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
if (!LinkAsLibrary) {
|
||||
// Make sure the output executable has an "exe" suffix.
|
||||
sys::Path ExeFile( OutputFilename );
|
||||
if (ExeFile.getSuffix() != "exe") {
|
||||
if (OutputFilename == "a.out") {
|
||||
// Default to "a.exe" instead of "a.out".
|
||||
if (OutputFilename.getNumOccurrences() == 0)
|
||||
OutputFilename = "a.exe";
|
||||
} else {
|
||||
|
||||
// If there is no suffix add an "exe" one.
|
||||
sys::Path ExeFile( OutputFilename );
|
||||
if (ExeFile.getSuffix() == "") {
|
||||
ExeFile.appendSuffix("exe");
|
||||
OutputFilename = ExeFile.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Generate the bitcode for the optimized module.
|
||||
|
Loading…
x
Reference in New Issue
Block a user