diff dmd/module.c @ 1645:1d2d1aa16841

Don't error out with -singleobj, -of, and -c/-output-{bc,ll,o,s}.
author Matti Niemenmaa <matti.niemenmaa+hg@iki.fi>
date Tue, 09 Mar 2010 23:20:39 +0200
parents 9bf06e02070b
children a8fc855f156e
line wrap: on
line diff
--- a/dmd/module.c	Tue Mar 09 23:07:08 2010 +0200
+++ b/dmd/module.c	Tue Mar 09 23:20:39 2010 +0200
@@ -219,7 +219,7 @@
     files.insert(std::make_pair(str, NewMod));
 }
 
-void Module::buildTargetFiles()
+void Module::buildTargetFiles(bool singleObj)
 {
     if(objfile && 
        (!doDocComment || docfile) && 
@@ -252,7 +252,8 @@
 
     // LDC
     // another safety check to make sure we don't overwrite previous output files
-    check_and_add_output_file(this, objfile->name->str);
+    if (!singleObj)
+        check_and_add_output_file(this, objfile->name->str);
     if (docfile)
         check_and_add_output_file(this, docfile->name->str);
     if (hdrfile)