Skip to content

Commit

Permalink
Review comments (to squash)
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 committed Dec 31, 2020
1 parent 5e38843 commit 0841d0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Changes
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Working version
* #10098: Improve command-line parsing in ocamlrun: strictly recognise options,
be more informative for `ocamlrun -I`, support `--` for terminating options
parsing and permit gcc-style `-Ifoo` for `-I foo`.
(David Allsopp, review by ???)
(David Allsopp, review by Xavier Leroy)

### Code generation and optimizations:

Expand Down
9 changes: 5 additions & 4 deletions runtime/startup_byt.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,11 @@ static int parse_command_line(char_os **argv)
len = strlen_os(argv[i]);
parsed = 1;
if (len == 2) {
if (argv[i][1] == '-') {
i++;
break;
}
/* 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 Expand Up @@ -321,6 +321,7 @@ static int parse_command_line(char_os **argv)
parsed = 0;
}
} else {
/* Named options, e.g. -version */
if (!strcmp_os(argv[i], T("-version"))) {
printf("%s\n", "The OCaml runtime, version " OCAML_VERSION_STRING);
exit(0);
Expand Down

0 comments on commit 0841d0b

Please sign in to comment.