Skip to content

Commit

Permalink
Terminate ocamlrun argument parsing with --
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 committed Feb 4, 2020
1 parent cad5476 commit 086380d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ Working version
a breaking change if the configuration system was being abused before).
(David Allsopp, review by Xavier Leroy)

* #10098: Improve command-line parsing in ocamlrun: strictly recognise options
and be more informative for `ocamlrun -I`.
* #10098: Improve command-line parsing in ocamlrun: strictly recognise options,
be more informative for `ocamlrun -I` and support `--` for terminating options
parsing.
(David Allsopp, review by Xavier Leroy)

### Code generation and optimizations:
Expand Down
3 changes: 3 additions & 0 deletions runtime/startup_byt.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ static int parse_command_line(char_os **argv)
if (len == 2) {
/* Single-letter options, e.g. -v */
switch(argv[i][1]) {
case '-':
return i + 1;
break;
case 't':
++ caml_trace_level; /* ignored unless DEBUG mode */
break;
Expand Down

0 comments on commit 086380d

Please sign in to comment.