Fix vccexe compilation

This commit is contained in:
Neelesh Chandola
2018-12-13 12:40:52 +05:30
parent 76c214a2e9
commit 9ebe52cdeb
2 changed files with 11 additions and 11 deletions

View File

@@ -2,12 +2,12 @@ import strutils, strtabs, os, osproc, vcvarsall, vccenv
type
VccVersion* = enum ## VCC compiler backend versions
vccUndefined = (0, ""), ## VCC version undefined, resolves to the latest recognizable VCC version
vcc90 = vs90, ## Visual Studio 2008 (Version 9.0)
vcc100 = vs100, ## Visual Studio 2010 (Version 10.0)
vcc110 = vs110, ## Visual Studio 2012 (Version 11.0)
vcc120 = vs120, ## Visual Studio 2013 (Version 12.0)
vcc140 = vs140 ## Visual Studio 2015 (Version 14.0)
vccUndefined = 0, ## VCC version undefined, resolves to the latest recognizable VCC version
vcc90 = ord(vs90) ## Visual Studio 2008 (Version 9.0)
vcc100 = ord(vs100) ## Visual Studio 2010 (Version 10.0)
vcc110 = ord(vs110) ## Visual Studio 2012 (Version 11.0)
vcc120 = ord(vs120) ## Visual Studio 2013 (Version 12.0)
vcc140 = ord(vs140) ## Visual Studio 2015 (Version 14.0)
proc discoverVccVcVarsAllPath*(version: VccVersion = vccUndefined): string =
## Returns the path to the vcvarsall utility of the specified VCC compiler backend.
@@ -101,12 +101,12 @@ command was specified
when isMainModule:
var vccversionArg: seq[string] = @[]
var printPathArg: bool = false
var vcvarsallArg: string = nil
var commandArg: string = nil
var vcvarsallArg: string
var commandArg: string
var noCommandArg: bool = false
var platformArg: VccArch
var sdkTypeArg: VccPlatformType
var sdkVersionArg: string = nil
var sdkVersionArg: string
var verboseArg: bool = false
var clArgs: seq[TaintedString] = @[]

View File

@@ -34,7 +34,7 @@ type
vccplatUWP = "uwp", ## Universal Windows Platform (UWP) Application
vccplatOneCore = "onecore" # Undocumented platform type in the Windows SDK, probably XBox One SDK platform type.
proc vccVarsAll*(path: string, arch: VccArch = vccarchUnspecified, platform_type: VccPlatformType = vccplatEmpty, sdk_version: string = nil, verbose: bool = false): StringTableRef =
proc vccVarsAll*(path: string, arch: VccArch = vccarchUnspecified, platform_type: VccPlatformType = vccplatEmpty, sdk_version: string = "", verbose: bool = false): StringTableRef =
## Returns a string table containing the proper process environment to successfully execute VCC compile commands for the specified SDK version, CPU architecture and platform type.
##
## path
@@ -50,7 +50,7 @@ proc vccVarsAll*(path: string, arch: VccArch = vccarchUnspecified, platform_type
var vccvarsallpath = path
# Assume that default executable is in current directory or in PATH
if path == nil or path.len < 1:
if path == "":
vccvarsallpath = vcvarsallDefaultPath
var args: seq[string] = @[]