summary refs log tree commit diff stats
path: root/koch.nim
diff options
context:
space:
mode:
authorrockcavera <rockcavera@gmail.com>2020-12-14 07:07:55 -0300
committerGitHub <noreply@github.com>2020-12-14 11:07:55 +0100
commit9ac2ee7b8d80a6b4a6369626018492142889d158 (patch)
tree77e7d149faa41523d47ef82e770dc1be381c4f63 /koch.nim
parent7e1ae35195c9b1397d569ebb3b3a0d11fdcb16f4 (diff)
downloadNim-9ac2ee7b8d80a6b4a6369626018492142889d158.tar.gz
Fix #11506 (#16348)
fixes the problem of compiling vccexe.exe when it is in use.
Diffstat (limited to 'koch.nim')
-rw-r--r--koch.nim8
1 files changed, 7 insertions, 1 deletions
diff --git a/koch.nim b/koch.nim
index 628c81098..5da262884 100644
--- a/koch.nim
+++ b/koch.nim
@@ -156,7 +156,13 @@ proc bundleNimsuggest(args: string) =
                  options = "-d:release -d:danger " & args)
 
 proc buildVccTool(args: string) =
-  nimCompileFold("Compile Vcc", "tools/vccexe/vccexe.nim ", options = args)
+  let input = "tools/vccexe/vccexe.nim"
+  if contains(args, "--cc:vcc"):
+    nimCompileFold("Compile Vcc", input, "build", options = args)
+    let fileName = input.splitFile.name
+    moveFile(exe("build" / fileName), exe("bin" / fileName))
+  else:
+    nimCompileFold("Compile Vcc", input, options = args)
 
 proc bundleNimpretty(args: string) =
   nimCompileFold("Compile nimpretty", "nimpretty/nimpretty.nim",