Commit 0718018a authored by Robert Bradshaw's avatar Robert Bradshaw

Command line option for debug flags.

parent 3efa38a4
......@@ -125,9 +125,17 @@ def parse_command_line(args):
except ValueError, e:
sys.stderr.write("Error in compiler directive: %s\n" % e.args[0])
sys.exit(1)
elif option.startswith('--debug'):
option = option[2:].replace('-', '_')
import DebugFlags
if option in dir(DebugFlags):
setattr(DebugFlags, option, True)
else:
sys.stderr.write("Unknown debug flag: %s\n" % option)
bad_usage()
else:
sys.stderr.write("Unknown compiler flag: %s\n" % option)
bad_usage()
sys.exit(1)
else:
arg = pop_arg()
if arg.endswith(".pyx"):
......
# Can be enabled at the command line with --debug-xxx.
debug_disposal_code = 0
debug_temp_alloc = 0
debug_coercion = 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment