diff options
author | Araq <rumpf_a@web.de> | 2016-10-24 21:55:57 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2016-10-24 21:55:57 +0200 |
commit | 11dd0b3b5107a784bcb12c2d504a48a9a57884c5 (patch) | |
tree | 5de97895ab68a926c69c28d7ec9642544cf0050c /tools/vccenv/vccexe.nim | |
parent | c15cef7d2d1198ac1b552dcead0f1a65f366549a (diff) | |
download | Nim-11dd0b3b5107a784bcb12c2d504a48a9a57884c5.tar.gz |
simplified code of the upcoming vccexe and vcclinkerexe tools
Diffstat (limited to 'tools/vccenv/vccexe.nim')
-rw-r--r-- | tools/vccenv/vccexe.nim | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/vccenv/vccexe.nim b/tools/vccenv/vccexe.nim new file mode 100644 index 000000000..48ae8c8da --- /dev/null +++ b/tools/vccenv/vccexe.nim @@ -0,0 +1,24 @@ +import strtabs, os, osproc, vccenv + +when defined(release): + let vccOptions = {poParentStreams} +else: + let vccOptions = {poEchoCmd, poParentStreams} + +when isMainModule: + var vccEnvStrTab: StringTableRef = nil + when defined(i386): + vccEnvStrTab = getVccEnv "x86" + when defined(amd64): + vccEnvStrTab = getVccEnv "amd64" + when defined(arm): + vccEnvStrTab = getVccEnv "arm" + if vccEnvStrTab != nil: + for vccEnvKey, vccEnvVal in vccEnvStrTab: + putEnv(vccEnvKey, vccEnvVal) + let vccProcess = startProcess( + "cl.exe", + args = commandLineParams(), + options = vccOptions + ) + quit vccProcess.waitForExit() |