simplified code of the upcoming vccexe and vcclinkerexe tools
This commit is contained in:
parent
c15cef7d2d
commit
11dd0b3b51
4 changed files with 65 additions and 75 deletions
|
|
@ -1,25 +0,0 @@
|
|||
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".addFileExt(ExeExt),
|
||||
args = commandLineParams(),
|
||||
options = vccOptions
|
||||
)
|
||||
quit vccProcess.waitForExit()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue