summary refs log tree commit diff stats
path: root/compiler/extccomp.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-08-04 15:52:34 +0200
committerAraq <rumpf_a@web.de>2018-08-04 15:52:34 +0200
commit9235f7a3b39704a1a2e93602971e38bd93d80f3e (patch)
tree321234aa955a07a9ae656d49cc196a6babe47ec6 /compiler/extccomp.nim
parent1c80619ac528f4ec30ee882cb9232157a6763add (diff)
parente403ef25aceed929a3118e0dc2104c29e824dfcd (diff)
downloadNim-9235f7a3b39704a1a2e93602971e38bd93d80f3e.tar.gz
Merge branch 'devel' into araq-fixes-7833
Diffstat (limited to 'compiler/extccomp.nim')
-rw-r--r--compiler/extccomp.nim7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim
index f4ef93070..16b0d614d 100644
--- a/compiler/extccomp.nim
+++ b/compiler/extccomp.nim
@@ -645,7 +645,7 @@ proc compileCFile(conf: ConfigRef; list: CFileList, script: var Rope, cmds: var
     if optCompileOnly notin conf.globalOptions:
       add(cmds, compileCmd)
       let (_, name, _) = splitFile(it.cname)
-      add(prettyCmds, "CC: " & name)
+      add(prettyCmds, if hintCC in conf.notes: "CC: " & name else: "")
     if optGenScript in conf.globalOptions:
       add(script, compileCmd)
       add(script, "\n")
@@ -659,7 +659,7 @@ proc getLinkCmd(conf: ConfigRef; projectfile, objfiles: string): string =
         libname = getCurrentDir() / libname
     else:
       libname = (libNameTmpl(conf) % splitFile(conf.projectName).name)
-    result = CC[conf.cCompiler].buildLib % ["libfile", libname,
+    result = CC[conf.cCompiler].buildLib % ["libfile", quoteShell(libname),
                                        "objfiles", objfiles]
   else:
     var linkerExe = getConfigVar(conf, conf.cCompiler, ".linkerexe")
@@ -773,7 +773,8 @@ proc callCCompiler*(conf: ConfigRef; projectfile: string) =
   var prettyCmds: TStringSeq = @[]
   let prettyCb = proc (idx: int) =
     when declared(echo):
-      echo prettyCmds[idx]
+      let cmd = prettyCmds[idx]
+      if cmd != "": echo cmd
   compileCFile(conf, conf.toCompile, script, cmds, prettyCmds)
   if optCompileOnly notin conf.globalOptions:
     execCmdsInParallel(conf, cmds, prettyCb)