diff options
author | Ondrej Certik <ondrej@certik.cz> | 2010-12-03 19:26:14 -0800 |
---|---|---|
committer | Ondrej Certik <ondrej@certik.cz> | 2010-12-03 19:56:45 -0800 |
commit | 03397f1dae5df08467644106cf2c2083ed77806c (patch) | |
tree | a945c77810d4c8ba5da11f2029eb44ea46106968 /Cython/Compiler/CmdLine.py | |
parent | 16055821b0f43047db4f32f3a16335732b63aa85 (diff) | |
download | cython-03397f1dae5df08467644106cf2c2083ed77806c.tar.gz |
Implement the --fatal-errors command line option
If enabled, it will abort on the first error occured. Just like "gcc
-Wfatal-errors".
Signed-off-by: Ondrej Certik <ondrej@certik.cz>
Diffstat (limited to 'Cython/Compiler/CmdLine.py')
-rw-r--r-- | Cython/Compiler/CmdLine.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Cython/Compiler/CmdLine.py b/Cython/Compiler/CmdLine.py index 320690b0f..0b0c8244b 100644 --- a/Cython/Compiler/CmdLine.py +++ b/Cython/Compiler/CmdLine.py @@ -35,6 +35,7 @@ Options: --embed Embed the Python interpreter in a main() method. -2 Compile based on Python-2 syntax and code semantics. -3 Compile based on Python-3 syntax and code semantics. + --fatal-errors Abort the compilation on the first error -X, --directive <name>=<value>[,<name=value,...] Overrides a compiler directive """ @@ -117,6 +118,8 @@ def parse_command_line(args): options.language_level = 2 elif option == '-3': options.language_level = 3 + elif option == "--fatal-errors": + Options.fatal_errors = True elif option in ("-X", "--directive"): try: options.compiler_directives = Options.parse_directive_list( |