[pkg-d-commits] [ldc] 123/149: Append default file extension for LDMD only
Matthias Klumpp
mak at moszumanska.debian.org
Sun Apr 23 22:37:05 UTC 2017
This is an automated email from the git hooks/post-receive script.
mak pushed a commit to annotated tag v1.2.0
in repository ldc.
commit 7fc885e59f18c9ab0ceb2499b7600bd8a270190e
Author: Martin <noone at nowhere.com>
Date: Sat Mar 4 00:20:49 2017 +0100
Append default file extension for LDMD only
---
driver/linker.cpp | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/driver/linker.cpp b/driver/linker.cpp
index 557b60c..4984f79 100644
--- a/driver/linker.cpp
+++ b/driver/linker.cpp
@@ -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])
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git
More information about the pkg-d-commits
mailing list