|
@@ -44,7 +44,6 @@ def can_build():
|
|
|
|
|
|
return True
|
|
|
|
|
|
-
|
|
|
def get_opts():
|
|
|
|
|
|
return [
|
|
@@ -55,7 +54,7 @@ def get_opts():
|
|
|
('use_lto', 'Use link time optimization', 'no'),
|
|
|
('pulseaudio', 'Detect & use pulseaudio', 'yes'),
|
|
|
('udev', 'Use udev for gamepad connection callbacks', 'no'),
|
|
|
- ('debug_release', 'Add debug symbols to release version', 'no'),
|
|
|
+ ('debug_symbols', 'Add debug symbols to release version (yes/no/full)', 'yes')
|
|
|
]
|
|
|
|
|
|
|
|
@@ -77,16 +76,20 @@ def configure(env):
|
|
|
# -O3 -ffast-math is identical to -Ofast. We need to split it out so we can selectively disable
|
|
|
# -ffast-math in code for which it generates wrong results.
|
|
|
env.Prepend(CCFLAGS=['-O3', '-ffast-math'])
|
|
|
- if (env["debug_release"] == "yes"):
|
|
|
+ if (env["debug_symbols"] == "yes"):
|
|
|
+ env.Prepend(CCFLAGS=['-g1'])
|
|
|
+ if (env["debug_symbols"] == "full"):
|
|
|
env.Prepend(CCFLAGS=['-g2'])
|
|
|
|
|
|
elif (env["target"] == "release_debug"):
|
|
|
env.Prepend(CCFLAGS=['-O2', '-ffast-math', '-DDEBUG_ENABLED'])
|
|
|
- if (env["debug_release"] == "yes"):
|
|
|
+ if (env["debug_symbols"] == "yes"):
|
|
|
+ env.Prepend(CCFLAGS=['-g1'])
|
|
|
+ if (env["debug_symbols"] == "full"):
|
|
|
env.Prepend(CCFLAGS=['-g2'])
|
|
|
|
|
|
elif (env["target"] == "debug"):
|
|
|
- env.Prepend(CCFLAGS=['-g2', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
|
|
|
+ env.Prepend(CCFLAGS=['-g3', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
|
|
|
env.Append(LINKFLAGS=['-rdynamic'])
|
|
|
|
|
|
## Architecture
|