From eda9b303d2f7471a14a5a46ff3c100cc5357aa42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B8is=C3=A6ther=20Rasch?= Date: Wed, 1 Nov 2017 14:48:46 +0100 Subject: [PATCH] VCC always creates debug symbols when not in release (#6397) Use the `/Z7` option instead of `/Zi /FS` to store all debug info in the `.obj` file instead of a shared `.pdb` file --- config/nim.cfg | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/config/nim.cfg b/config/nim.cfg index 7ac87cc334..6ae55a9b2a 100644 --- a/config/nim.cfg +++ b/config/nim.cfg @@ -202,6 +202,11 @@ vcc.cpp.linkerexe = "vccexe.exe" # set the options for specific platforms: vcc.options.always = "/nologo" +@if release: + # no debug symbols in release builds +@else: + vcc.options.always %= "${vcc.options.always} /Z7" # Get VCC to output full debug symbols in the obj file +@end vcc.cpp.options.always %= "${vcc.options.always} /EHsc" vcc.options.linker = "/nologo /DEBUG /Zi /F33554432" # set the stack size to 32 MiB vcc.cpp.options.linker %= "${vcc.options.linker}" @@ -222,8 +227,8 @@ vcc.options.linker %= "--platform:arm ${vcc.options.linker}" vcc.cpp.options.linker %= "--platform:arm ${vcc.cpp.options.linker}" @end -vcc.options.debug = "/Zi /FS /Od" -vcc.cpp.options.debug = "/Zi /FS /Od" +vcc.options.debug = "/Od" +vcc.cpp.options.debug = "/Od" vcc.options.speed = "/O2" vcc.cpp.options.speed = "/O2" vcc.options.size = "/O1"