Support parameterless '-deps' command-line option

In both LDC (undocumented) and LDMD. This should fix issue #1626.
This commit is contained in:
Martin 2016-08-28 01:49:14 +02:00
parent 94d8cad554
commit 16b2c8942f
4 changed files with 13 additions and 12 deletions

View file

@ -469,9 +469,10 @@ static void parseCommandLine(int argc, char **argv, Strings &sourceFiles,
global.params.doHdrGeneration |=
global.params.hdrdir || global.params.hdrname;
initFromString(global.params.moduleDepsFile, moduleDepsFile);
if (global.params.moduleDepsFile != nullptr) {
if (moduleDeps.getNumOccurrences() != 0) {
global.params.moduleDeps = new OutBuffer;
if (!moduleDeps.empty())
global.params.moduleDepsFile = mem.xstrdup(moduleDeps.c_str());
}
// PGO options