summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/extccomp.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim
index bb2f09151..a7e4eceb7 100644
--- a/compiler/extccomp.nim
+++ b/compiler/extccomp.nim
@@ -579,7 +579,7 @@ proc CallCCompiler*(projectfile: string) =
       else:
         rawMessage(errGenerated, " execution of an external program failed; " &
                    "rerun with --parallelBuild:1 to see the error message")
-  if optNoLinking notin gGlobalOptions:
+  if optNoLinking notin gGlobalOptions and cmds.len > 0:
     # call the linker:
     var it = PStrEntry(toLink.head)
     var objfiles = ""