Commit 920ddf72 authored by Stefan Behnel's avatar Stefan Behnel

support '-Xdirective=value' on cmd line, in addition to '-X directive=value'

parent db5159a3
...@@ -133,10 +133,14 @@ def parse_command_line(args): ...@@ -133,10 +133,14 @@ def parse_command_line(args):
Options.fast_fail = True Options.fast_fail = True
elif option == "--disable-function-redefinition": elif option == "--disable-function-redefinition":
Options.disable_function_redefinition = True Options.disable_function_redefinition = True
elif option in ("-X", "--directive"): elif option == "--directive" or option.startswith('-X'):
if option.startswith('-X') and option[2:].strip():
x_args = option[2:]
else:
x_args = pop_arg()
try: try:
options.compiler_directives = Options.parse_directive_list( options.compiler_directives = Options.parse_directive_list(
pop_arg(), relaxed_bool=True, x_args, relaxed_bool=True,
current_settings=options.compiler_directives) current_settings=options.compiler_directives)
except ValueError, e: except ValueError, e:
sys.stderr.write("Error in compiler directive: %s\n" % e.args[0]) sys.stderr.write("Error in compiler directive: %s\n" % e.args[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