Skip to content

Commit

Permalink
Add release_debug target on windows
Browse files Browse the repository at this point in the history
Note: other platforms already implement release_debug by providing debug symbols with -g on release builds.
  • Loading branch information
lyuma committed Jul 31, 2020
1 parent 98d94d7 commit 05ea6ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -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/'),
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 05ea6ee

Please sign in to comment.