From 05ea6ee2f62e77f0f5d9919f9b8b9c65dff5710c Mon Sep 17 00:00:00 2001 From: Lyuma Date: Fri, 31 Jul 2020 15:45:28 -0700 Subject: [PATCH] Add release_debug target on windows Note: other platforms already implement release_debug by providing debug symbols with -g on release builds. --- SConstruct | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index a271dc7..ac63a79 100644 --- a/SConstruct +++ b/SConstruct @@ -9,7 +9,7 @@ opts = Variables(customs, ARGUMENTS) env = DefaultEnvironment() # Define our parameters -opts.Add(EnumVariable('target', "Compilation target", 'release', ['d', 'debug', 'r', 'release'])) +opts.Add(EnumVariable('target', "Compilation target", 'release', ['d', 'debug', 'r', 'release', 'release_debug'])) opts.Add(EnumVariable('platform', "Compilation platform", 'windows', ['windows', 'x11', 'linux', 'osx'])) opts.AddVariables( PathVariable('openvr_path', 'The path where the OpenVR repo is located.', 'openvr/'), @@ -53,6 +53,9 @@ if env['platform'] == 'windows': if env['target'] in ('debug', 'd'): env.Append(CCFLAGS = ['-EHsc', '-D_DEBUG', '-MDd', '-Zi', '-FS']) env.Append(LINKFLAGS = ['-DEBUG:FULL']) + elif env['target'] in ('release_debug',): + env.Append(CCFLAGS = ['-O2', '-EHsc', '-DNDEBUG', '-MD', '-Zi', '-FS']) + env.Append(LINKFLAGS = ['-DEBUG:FULL']) else: env.Append(CCFLAGS = ['-O2', '-EHsc', '-DNDEBUG', '-MD']) # untested