## Build options
+### SCons variables
+
There are some variables which set build options which need to be controlled on
a per ABI level. Currently, these are:
host, then you'll need to set an appopriate prefix and may be able to clear
some other prefix corresponding to that host.
+### SCons command line flags
+
+--debug-build: Compile with the -g option, and -O0.
+
## External dependency detection
In some cases, if an external dependency isn't detected, the build will
def abspath(d):
return os.path.abspath(str(d))
+AddOption('--debug-build', dest='debug_build', action='store_true',
+ help='Build with debug info, and disable optimizations.')
+
# Universal settings.
-main.Append(CXXFLAGS=[ '-O2' ])
-main.Append(CCFLAGS=[ '-O2' ])
+if GetOption('debug_build'):
+ main.Append(CXXFLAGS=[ '-O0', '-g' ])
+ main.Append(CCFLAGS=[ '-O0', '-g' ])
+else:
+ main.Append(CXXFLAGS=[ '-O2' ])
+ main.Append(CCFLAGS=[ '-O2' ])
main.Append(CPPPATH=[ common_include ])
# Propogate the environment's PATH setting.