Merge pull request #9634 from nojb/ocamlrunparam_comma_fix

Allow ',' at the start of OCAMLRUNPARAM
master
Gabriel Scherer 2020-06-05 07:12:40 +02:00 committed by GitHub
commit a8a2a7b757
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -30,6 +30,9 @@ Working version
(Nicolás Ojeda Bär, review by Stephen Dolan, Gabriel Scherer, Mark Shinwell,
and Xavier Leroy)
- #9634: Allow initial and repeated commas in `OCAMLRUNPARAM`.
(Nicolás Ojeda Bär, review by Gabriel Scherer)
### Code generation and optimizations:
- #9441: Add RISC-V RV64G native-code backend.

View File

@ -98,6 +98,8 @@ The following environment variables are also consulted:
(If "OCAMLRUNPARAM" is not set, "CAMLRUNPARAM" will be used instead.)
This variable must be a sequence of parameter specifications separated
by commas.
For convenience, commas at the beginning of the variable are ignored,
and multiple runs of commas are interpreted as a single one.
A parameter specification is an option letter followed by an "="
sign, a decimal number (or an hexadecimal number prefixed by "0x"),
and an optional multiplier. The options are documented below;

View File

@ -135,6 +135,7 @@ void caml_parse_ocamlrunparam(void)
case 'v': scanmult (opt, &caml_verb_gc); break;
case 'w': scanmult (opt, &caml_init_major_window); break;
case 'W': scanmult (opt, &caml_runtime_warnings); break;
case ',': continue;
}
while (*opt != '\0'){
if (*opt++ == ',') break;