summary refs log tree commit diff stats
path: root/tools/vccenv
diff options
context:
space:
mode:
authorFredrik Høisæther Rasch <fredrik.rasch@gmail.com>2016-10-25 10:32:42 +0200
committerFredrik Høisæther Rasch <fredrik.rasch@gmail.com>2016-10-25 10:32:42 +0200
commit04a610c55b5441625ec7869962c7449ea093e1e8 (patch)
tree0ad7ea85fd9a64595fa664c91898b3fddd773d0f /tools/vccenv
parente99f35ff23ae05e6f7c8d5826fdaced852c8ff40 (diff)
downloadNim-04a610c55b5441625ec7869962c7449ea093e1e8.tar.gz
Deleted VCC Linkerexe wrapper
Link.exe wrapper superfluous, because Nim uses cl.exe command-line arguments to defer to linker
Diffstat (limited to 'tools/vccenv')
-rw-r--r--tools/vccenv/vcclinkerexe.nim67
1 files changed, 0 insertions, 67 deletions
diff --git a/tools/vccenv/vcclinkerexe.nim b/tools/vccenv/vcclinkerexe.nim
deleted file mode 100644
index 59cccd6f8..000000000
--- a/tools/vccenv/vcclinkerexe.nim
+++ /dev/null
@@ -1,67 +0,0 @@
-import strutils, strtabs, os, osproc, vccenv
-
-when defined(release):
-  let vccOptions = {poParentStreams}
-else:
-  let vccOptions = {poEchoCmd, poParentStreams}
-
-const 
-  vcvarsArgPrefix = "vcvars:"
-  platformArgPrefix = "platform:"
-  storeArgPrefix = "store"
-  sdkArgPrefix = "sdk:"
-  vcvarsArgIdx = 1   # vcvars comes after - or / char in argument
-  argsToken1Idx = vcvarsArgIdx + vcvarsArgPrefix.len 
-  platformArgValueIdx = argsToken1Idx + platformArgPrefix.len
-  sdkArgValueIdx = argsToken1Idx + sdkArgPrefix.len
-
-  HelpText = """
-+-----------------------------------------------------------------+
-|         Microsoft C/C++ compiler wrapper for Nim                |
-|             (c) 2016 Fredrik Høisæther Rasch                    |
-+-----------------------------------------------------------------+
-
-Usage:
-  vccexe [options] [compileroptions]
-Options:
-  /vcvars:platform:<arch>   Specify the Compiler Platform Tools architecture
-                            <arch>: x86 | amd64 | arm | x86_amd64 | x86_arm | amd64_x86 | amd64_arm
-  /vcvars:store             Use Windows Store (rather than desktop) development tools
-  /vcvars:sdk:<version>     Use a specific Windows SDK version:
-                            <version> is either the full Windows 10 SDK version number or 
-                            "8.1" to use the windows 8.1 SDK
-"""
-
-when isMainModule:
-  var platformArg: string = nil
-  var storeArg: bool = false
-  var sdkVersionArg: string = nil
-  var clArgs: seq[TaintedString] = @[]
-  var wrapperArgs = commandLineParams()
-  for wargv in wrapperArgs:
-    # Check whether the current argument contains vcvars prefix
-    if cmpIgnoreCase(wargv.substr(vcvarsArgIdx, argsToken1Idx - 1), vcvarsArgPrefix) == 0:
-      # Check for platform
-      if cmpIgnoreCase(wargv.substr(argsToken1Idx, platformArgValueIdx - 1), platformArgPrefix) == 0:
-        platformArg = wargv.substr(platformArgValueIdx)
-      # Check for store
-      elif cmpIgnoreCase(wargv.substr(argsToken1Idx), storeArgPrefix) == 0:
-        storeArg = true
-      # Check for sdk
-      elif cmpIgnoreCase(wargv.substr(argsToken1Idx, sdkArgValueIdx - 1), sdkArgPrefix) == 0:
-        sdkVersionArg = wargv.substr(sdkArgValueIdx)
-    else: # Regular cl.exe argument -> store for final cl.exe invocation
-      if (wargv.len == 2) and (wargv[1] == '?'):
-        echo HelpText
-      clArgs.add(wargv)
-
-  var vccEnvStrTab = getVccEnv(platformArg, storeArg, sdkVersionArg)  
-  if vccEnvStrTab != nil:
-    for vccEnvKey, vccEnvVal in vccEnvStrTab:
-      putEnv(vccEnvKey, vccEnvVal)
-  let vccProcess = startProcess(
-      "link.exe",
-      args = clArgs,
-      options = vccOptions
-    )
-  quit vccProcess.waitForExit()