Skip to content
Snippets Groups Projects
Commit 723802d2 authored by Andrea Shepard's avatar Andrea Shepard
Browse files

Add --force-debug build option

parent 38e4a2d5
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,12 @@ AddOption('--coverage',
action='store_true',
help='Build with coverage instrumentation')
AddOption('--force-debug',
dest='force_debug',
default=False,
action='store_true',
help='Build with debug symbols, even in the opt variant')
AddOption('--gprof',
dest='gprof',
default=False,
......@@ -135,6 +141,12 @@ if GetOption('coverage'):
else:
env.ParseConfig('llvm-config --ldflags')
if GetOption('force_debug'):
if env['CC'] == 'cl':
env.Append(CCFLAGS=['/Z7'])
else:
env.Append(CCFLAGS=['-g'])
if GetOption('gprof'):
if env['CC'] == 'gcc' and env['CXX'] == 'g++':
env.Append(CCFLAGS=['-pg'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment