mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-07 19:36:06 +03:00
Append default file extension for LDMD only
This commit is contained in:
parent
9a1c4adbbc
commit
7fc885e59f
1 changed files with 8 additions and 3 deletions
|
@ -77,8 +77,10 @@ static std::string getOutputName(bool const sharedLib) {
|
|||
}
|
||||
|
||||
if (global.params.exefile) {
|
||||
return extension ? FileName::defaultExt(global.params.exefile, extension)
|
||||
: global.params.exefile;
|
||||
// DMD adds the default extension if there is none
|
||||
return opts::invokedByLDMD && extension
|
||||
? FileName::defaultExt(global.params.exefile, extension)
|
||||
: global.params.exefile;
|
||||
}
|
||||
|
||||
// Infer output name from first object file.
|
||||
|
@ -837,7 +839,10 @@ int createStaticLibrary() {
|
|||
// output filename
|
||||
std::string libName;
|
||||
if (global.params.libname) { // explicit
|
||||
libName = FileName::defaultExt(global.params.libname, global.lib_ext);
|
||||
// DMD adds the default extension if there is none
|
||||
libName = opts::invokedByLDMD
|
||||
? FileName::defaultExt(global.params.libname, global.lib_ext)
|
||||
: global.params.libname;
|
||||
} else { // infer from first object file
|
||||
libName = global.params.objfiles->dim
|
||||
? FileName::removeExt((*global.params.objfiles)[0])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue