From e99f35ff23ae05e6f7c8d5826fdaced852c8ff40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B8is=C3=A6ther=20Rasch?= Date: Tue, 25 Oct 2016 01:49:18 +0200 Subject: [PATCH 1/9] VCC wrappers with vcvars args. VCC wrappers no longer wrap for compile-time specific target VCC wrappers now peek into the command line args and evaluate vcvars prefixed arguments --- config/nim.cfg | 12 +++++-- tools/vccenv/vccexe.nim | 61 +++++++++++++++++++++++++++++----- tools/vccenv/vcclinkerexe.nim | 62 +++++++++++++++++++++++++++++------ 3 files changed, 114 insertions(+), 21 deletions(-) diff --git a/config/nim.cfg b/config/nim.cfg index 8c8270f3e..65bdd2a61 100644 --- a/config/nim.cfg +++ b/config/nim.cfg @@ -177,10 +177,18 @@ clang.options.speed = "-O3" clang.options.size = "-Os" # Configuration for the Visual C/C++ compiler: -vcc.options.linker = "/DEBUG /Zi /Fd\"$projectName.pdb\" /F33554432" # set the stack size to 8 MB +vcc.exe = "vccexe.exe" +vcc.linkerexe = "vccexe.exe" + +# Here we need to set the options for specific platforms: +# amd64.windows.vcc.options = "/vcvars:platform:amd64" +# i386.windows.vcc.options = "/vcvars:platform:x86" +# arm.windows.vcc.options = "/vcvars:platform:arm" + +vcc.options.linker = "/nologo /DEBUG /Zi /Fd\"$projectName.pdb\" /F33554432" # set the stack size to 8 MB vcc.options.debug = "/Zi /Fd\"$projectName.pdb\"" vcc.options.always = "/nologo" -vcc.options.speed = "/O2 /arch:SSE2" +vcc.options.speed = "/O2" vcc.options.size = "/O1" # Configuration for the Tiny C Compiler: diff --git a/tools/vccenv/vccexe.nim b/tools/vccenv/vccexe.nim index 48ae8c8da..3193dbbba 100644 --- a/tools/vccenv/vccexe.nim +++ b/tools/vccenv/vccexe.nim @@ -1,24 +1,67 @@ -import strtabs, os, osproc, vccenv +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: Specify the Compiler Platform Tools architecture + : x86 | amd64 | arm | x86_amd64 | x86_arm | amd64_x86 | amd64_arm + /vcvars:store Use Windows Store (rather than desktop) development tools + /vcvars:sdk: Use a specific Windows SDK version: + is either the full Windows 10 SDK version number or + "8.1" to use the windows 8.1 SDK +""" + when isMainModule: - var vccEnvStrTab: StringTableRef = nil - when defined(i386): - vccEnvStrTab = getVccEnv "x86" - when defined(amd64): - vccEnvStrTab = getVccEnv "amd64" - when defined(arm): - vccEnvStrTab = getVccEnv "arm" + 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( "cl.exe", - args = commandLineParams(), + args = clArgs, options = vccOptions ) quit vccProcess.waitForExit() diff --git a/tools/vccenv/vcclinkerexe.nim b/tools/vccenv/vcclinkerexe.nim index 51c778f38..59cccd6f8 100644 --- a/tools/vccenv/vcclinkerexe.nim +++ b/tools/vccenv/vcclinkerexe.nim @@ -1,25 +1,67 @@ -import strtabs, os, osproc, vccenv +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: Specify the Compiler Platform Tools architecture + : x86 | amd64 | arm | x86_amd64 | x86_arm | amd64_x86 | amd64_arm + /vcvars:store Use Windows Store (rather than desktop) development tools + /vcvars:sdk: Use a specific Windows SDK version: + is either the full Windows 10 SDK version number or + "8.1" to use the windows 8.1 SDK +""" + when isMainModule: - var vccEnvStrTab: StringTableRef = nil - when defined(i386): - vccEnvStrTab = getVccEnv "x86" - when defined(amd64): - vccEnvStrTab = getVccEnv "amd64" - when defined(arm): - vccEnvStrTab = getVccEnv "arm" + 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 = commandLineParams(), + args = clArgs, options = vccOptions ) quit vccProcess.waitForExit() - From 04a610c55b5441625ec7869962c7449ea093e1e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B8is=C3=A6ther=20Rasch?= Date: Tue, 25 Oct 2016 10:32:42 +0200 Subject: [PATCH 2/9] Deleted VCC Linkerexe wrapper Link.exe wrapper superfluous, because Nim uses cl.exe command-line arguments to defer to linker --- tools/vccenv/vcclinkerexe.nim | 67 ----------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 tools/vccenv/vcclinkerexe.nim 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: Specify the Compiler Platform Tools architecture - : x86 | amd64 | arm | x86_amd64 | x86_arm | amd64_x86 | amd64_arm - /vcvars:store Use Windows Store (rather than desktop) development tools - /vcvars:sdk: Use a specific Windows SDK 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() From 7b1f948b728a943fd6bb3180c0f6558a19b2fa61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B8is=C3=A6ther=20Rasch?= Date: Tue, 25 Oct 2016 10:59:43 +0200 Subject: [PATCH 3/9] Nim.cfg: Arch option dependent on target platform --- config/nim.cfg | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/nim.cfg b/config/nim.cfg index 65bdd2a61..0390ea914 100644 --- a/config/nim.cfg +++ b/config/nim.cfg @@ -188,7 +188,13 @@ vcc.linkerexe = "vccexe.exe" vcc.options.linker = "/nologo /DEBUG /Zi /Fd\"$projectName.pdb\" /F33554432" # set the stack size to 8 MB vcc.options.debug = "/Zi /Fd\"$projectName.pdb\"" vcc.options.always = "/nologo" +@if defined(i386): +vcc.options.speed = "/O2 /arch:SSE2" +@elif defined(amd64): +vcc.options.speed = "/O2 /arch:AVX" +@else: vcc.options.speed = "/O2" +@end vcc.options.size = "/O1" # Configuration for the Tiny C Compiler: From 3b1c5183df0e2c3032e3a03f6554d9d2b8d53b71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B8is=C3=A6ther=20Rasch?= Date: Tue, 25 Oct 2016 18:07:31 +0200 Subject: [PATCH 4/9] config: corrected vcc wrapper arguments to right syntax --- config/nim.cfg | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/config/nim.cfg b/config/nim.cfg index 0390ea914..c054deeb3 100644 --- a/config/nim.cfg +++ b/config/nim.cfg @@ -180,21 +180,24 @@ clang.options.size = "-Os" vcc.exe = "vccexe.exe" vcc.linkerexe = "vccexe.exe" -# Here we need to set the options for specific platforms: -# amd64.windows.vcc.options = "/vcvars:platform:amd64" -# i386.windows.vcc.options = "/vcvars:platform:x86" -# arm.windows.vcc.options = "/vcvars:platform:arm" - -vcc.options.linker = "/nologo /DEBUG /Zi /Fd\"$projectName.pdb\" /F33554432" # set the stack size to 8 MB -vcc.options.debug = "/Zi /Fd\"$projectName.pdb\"" -vcc.options.always = "/nologo" -@if defined(i386): -vcc.options.speed = "/O2 /arch:SSE2" -@elif defined(amd64): -vcc.options.speed = "/O2 /arch:AVX" +# set the options for specific platforms: +@if i386: +vcc.options.always = "/nologo /vcvars:platform:x86" +vcc.options.linker.always = "/nologo /vcvars:platform:x86" +@elif amd64: +vcc.options.always = "/nologo /vcvars:platform:amd64" +vcc.options.linker.always = "/nologo /vcvars:platform:amd64" +@elif arm: +vcc.options.always = "/nologo /vcvars:platform:arm" +vcc.options.linker.always = "/nologo /vcvars:platform:arm" @else: -vcc.options.speed = "/O2" +vcc.options.always = "/nologo" +vcc.options.linker.always = "/nologo" @end + +vcc.options.linker = "/DEBUG /Zi /Fd\"$projectName.pdb\" /F33554432" # set the stack size to 8 MB +vcc.options.debug = "/Zi /Fd\"$projectName.pdb\"" +vcc.options.speed = "/O2" vcc.options.size = "/O1" # Configuration for the Tiny C Compiler: From 1af0ac9d2cb9c85b1c2a5d0308e927f1d7bb1144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B8is=C3=A6ther=20Rasch?= Date: Tue, 25 Oct 2016 19:19:58 +0200 Subject: [PATCH 5/9] vccwrapper with nim-like command line args --- config/nim.cfg | 12 +++++----- tools/vccenv/vccexe.nim | 53 ++++++++++++++++++++--------------------- 2 files changed, 32 insertions(+), 33 deletions(-) diff --git a/config/nim.cfg b/config/nim.cfg index c054deeb3..ada7212f9 100644 --- a/config/nim.cfg +++ b/config/nim.cfg @@ -182,14 +182,14 @@ vcc.linkerexe = "vccexe.exe" # set the options for specific platforms: @if i386: -vcc.options.always = "/nologo /vcvars:platform:x86" -vcc.options.linker.always = "/nologo /vcvars:platform:x86" +vcc.options.always = "--platform:x86 /nologo" +vcc.options.linker.always = "--platform:x86 /nologo" @elif amd64: -vcc.options.always = "/nologo /vcvars:platform:amd64" -vcc.options.linker.always = "/nologo /vcvars:platform:amd64" +vcc.options.always = "--platform:am64 /nologo" +vcc.options.linker.always = "--platform:amd64 /nologo" @elif arm: -vcc.options.always = "/nologo /vcvars:platform:arm" -vcc.options.linker.always = "/nologo /vcvars:platform:arm" +vcc.options.always = "--platform:arm /nologo" +vcc.options.linker.always = "--platform:arm /nologo" @else: vcc.options.always = "/nologo" vcc.options.linker.always = "/nologo" diff --git a/tools/vccenv/vccexe.nim b/tools/vccenv/vccexe.nim index 3193dbbba..bbac117df 100644 --- a/tools/vccenv/vccexe.nim +++ b/tools/vccenv/vccexe.nim @@ -1,4 +1,4 @@ -import strutils, strtabs, os, osproc, vccenv +import strutils, strtabs, os, osproc, parseopt, vccenv when defined(release): let vccOptions = {poParentStreams} @@ -6,15 +6,13 @@ 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 + platformPrefix = "--platform" + winstorePrefix = "--winstore" + sdkversionPrefix = "--sdkversion" + platformSepIdx = platformPrefix.len + sdkversionSepIdx = sdkversionPrefix.len + HelpText = """ +-----------------------------------------------------------------+ | Microsoft C/C++ compiler wrapper for Nim | @@ -24,32 +22,33 @@ const Usage: vccexe [options] [compileroptions] Options: - /vcvars:platform: Specify the Compiler Platform Tools architecture - : x86 | amd64 | arm | x86_amd64 | x86_arm | amd64_x86 | amd64_arm - /vcvars:store Use Windows Store (rather than desktop) development tools - /vcvars:sdk: Use a specific Windows SDK version: - is either the full Windows 10 SDK version number or - "8.1" to use the windows 8.1 SDK + --platform: Specify the Compiler Platform Tools architecture + : x86 | amd64 | arm | x86_amd64 | x86_arm | amd64_x86 | amd64_arm + --winstore Use Windows Store (rather than desktop) development tools + --sdkversion: Use a specific Windows SDK version: + is either the full Windows 10 SDK version number or + "8.1" to use the windows 8.1 SDK + +Other command line arguments are passed on to the +Microsoft C/C++ compiler for the specified SDK toolset """ when isMainModule: var platformArg: string = nil - var storeArg: bool = false var sdkVersionArg: string = nil + var storeArg: bool = false + 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) + # Check whether the current argument contains -- prefix + if wargv.startsWith(platformPrefix): # Check for platform + platformArg = wargv.substr(platformSepIdx + 1) + elif wargv == winstorePrefix: # Check for winstore + storeArg = true + elif wargv.startsWith(sdkversionPrefix): # Check for sdkversion + sdkVersionArg = wargv.substr(sdkversionSepIdx + 1) else: # Regular cl.exe argument -> store for final cl.exe invocation if (wargv.len == 2) and (wargv[1] == '?'): echo HelpText From c3c96a947e1dd1b445323139dfd81ff674ac080d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B8is=C3=A6ther=20Rasch?= Date: Tue, 25 Oct 2016 19:53:45 +0200 Subject: [PATCH 6/9] vccwrap: Removed import of parseopt Not necessary, since vccexe uses less advanced, but non-invasive argument parsing --- tools/vccenv/vccexe.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/vccenv/vccexe.nim b/tools/vccenv/vccexe.nim index bbac117df..892246830 100644 --- a/tools/vccenv/vccexe.nim +++ b/tools/vccenv/vccexe.nim @@ -1,4 +1,4 @@ -import strutils, strtabs, os, osproc, parseopt, vccenv +import strutils, strtabs, os, osproc, vccenv when defined(release): let vccOptions = {poParentStreams} From febb551f7a4213d61d5f9ba5b5926b8578884445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B8is=C3=A6ther=20Rasch?= Date: Tue, 25 Oct 2016 21:08:23 +0200 Subject: [PATCH 7/9] corrected --platform arg for amd64 (VCC) --- config/nim.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/nim.cfg b/config/nim.cfg index ada7212f9..088383f96 100644 --- a/config/nim.cfg +++ b/config/nim.cfg @@ -185,7 +185,7 @@ vcc.linkerexe = "vccexe.exe" vcc.options.always = "--platform:x86 /nologo" vcc.options.linker.always = "--platform:x86 /nologo" @elif amd64: -vcc.options.always = "--platform:am64 /nologo" +vcc.options.always = "--platform:amd64 /nologo" vcc.options.linker.always = "--platform:amd64 /nologo" @elif arm: vcc.options.always = "--platform:arm /nologo" From d94bb4a0e188d38dcb393566978c3cae20b6d82f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B8is=C3=A6ther=20Rasch?= Date: Tue, 25 Oct 2016 21:17:18 +0200 Subject: [PATCH 8/9] options.linker made platform specific previous options.linker.always is not supported in nim.cfg Removed /Fd\"$projectName.pdb\" (Implied by /Zi) --- config/nim.cfg | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/config/nim.cfg b/config/nim.cfg index 088383f96..930b5b17b 100644 --- a/config/nim.cfg +++ b/config/nim.cfg @@ -183,20 +183,19 @@ vcc.linkerexe = "vccexe.exe" # set the options for specific platforms: @if i386: vcc.options.always = "--platform:x86 /nologo" -vcc.options.linker.always = "--platform:x86 /nologo" +vcc.options.linker = "--platform:x86 /nologo /DEBUG /Zi /F33554432" # set the stack size to 8 MB @elif amd64: vcc.options.always = "--platform:amd64 /nologo" -vcc.options.linker.always = "--platform:amd64 /nologo" +vcc.options.linker = "--platform:amd64 /nologo /DEBUG /Zi /F33554432" # set the stack size to 8 MB @elif arm: vcc.options.always = "--platform:arm /nologo" -vcc.options.linker.always = "--platform:arm /nologo" +vcc.options.linker = "--platform:arm /nologo /DEBUG /Zi /F33554432" # set the stack size to 8 MB @else: vcc.options.always = "/nologo" -vcc.options.linker.always = "/nologo" +vcc.options.linker = "/nologo /DEBUG /Zi /F33554432" # set the stack size to 8 MB @end -vcc.options.linker = "/DEBUG /Zi /Fd\"$projectName.pdb\" /F33554432" # set the stack size to 8 MB -vcc.options.debug = "/Zi /Fd\"$projectName.pdb\"" +vcc.options.debug = "/Zi /Od" vcc.options.speed = "/O2" vcc.options.size = "/O1" From a13e2bd5ec9b152474a19aa3fe372df8a25d47be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B8is=C3=A6ther=20Rasch?= Date: Tue, 25 Oct 2016 21:33:30 +0200 Subject: [PATCH 9/9] Prevent concurrency issues on the PDB file by using /FS option --- config/nim.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/nim.cfg b/config/nim.cfg index 930b5b17b..b5bcc4053 100644 --- a/config/nim.cfg +++ b/config/nim.cfg @@ -195,7 +195,7 @@ vcc.options.always = "/nologo" vcc.options.linker = "/nologo /DEBUG /Zi /F33554432" # set the stack size to 8 MB @end -vcc.options.debug = "/Zi /Od" +vcc.options.debug = "/Zi /FS /Od" vcc.options.speed = "/O2" vcc.options.size = "/O1"