1 (**************************************************************************)
2 (* *)
3 (* OCaml *)
4 (* *)
5 (* Damien Doligez, projet Para, INRIA Rocquencourt *)
6 (* *)
7 (* Copyright 1998 Institut National de Recherche en Informatique et *)
8 (* en Automatique. *)
9 (* *)
10 (* All rights reserved. This file is distributed under the terms of *)
11 (* the GNU Lesser General Public License version 2.1, with the *)
12 (* special exception on linking described in the file LICENSE. *)
13 (* *)
14 (**************************************************************************)
15
16 let mk_a f =
17 "-a", Arg.Unit f, " Build a library"
18 ;;
19
20 let mk_alert f =
21 "-alert", Arg.String f,
22 Printf.sprintf
23 "<list> Enable or disable alerts according to <list>:\n\
24 \ +<alertname> enable alert <alertname>\n\
25 \ -<alertname> disable alert <alertname>\n\
26 \ ++<alertname> treat <alertname> as fatal error\n\
27 \ --<alertname> treat <alertname> as non-fatal\n\
28 \ @<alertname> enable <alertname> and treat it as fatal error\n\
29 \ <alertname> can be 'all' to refer to all alert names";;
30
31 let mk_absname f =
32 "-absname", Arg.Unit f, " Show absolute filenames in error messages"
33 ;;
34
35 let mk_annot f =
36 "-annot", Arg.Unit f, " Save information in <filename>.annot"
37 ;;
38
39 let mk_binannot f =
40 "-bin-annot", Arg.Unit f, " Save typedtree in <filename>.cmt"
41 ;;
42
43 let mk_c f =
44 "-c", Arg.Unit f, " Compile only (do not link)"
45 ;;
46
47 let mk_cc f =
48 "-cc", Arg.String f, "<command> Use <command> as the C compiler and linker"
49 ;;
50
51 let mk_cclib f =
52 "-cclib", Arg.String f, "<opt> Pass option <opt> to the C linker"
53 ;;
54
55 let mk_ccopt f =
56 "-ccopt", Arg.String f,
57 "<opt> Pass option <opt> to the C compiler and linker"
58 ;;
59
60 let mk_clambda_checks f =
61 "-clambda-checks", Arg.Unit f, " Instrument clambda code with closure and \
62 field access checks (for debugging the compiler)"
63 ;;
64
65 let mk_compact f =
66 "-compact", Arg.Unit f, " Optimize code size rather than speed"
67 ;;
68
69 let mk_compat_32 f =
70 "-compat-32", Arg.Unit f,
71 " Check that generated bytecode can run on 32-bit platforms"
72 ;;
73
74 let mk_config f =
75 "-config", Arg.Unit f, " Print configuration values and exit"
76 ;;
77
78 let mk_config_var f =
79 "-config-var", Arg.String f,
80 " Print the value of a configuration variable, a newline, and exit\n\
81 \ (print nothing and exit with error value if the variable does not exist)"
82 ;;
83
84 let mk_custom f =
85 "-custom", Arg.Unit f, " Link in custom mode"
86 ;;
87
88 let mk_dllib f =
89 "-dllib", Arg.String f, "<lib> Use the dynamically-loaded library <lib>"
90 ;;
91
92 let mk_dllpath f =
93 "-dllpath", Arg.String f,
94 "<dir> Add <dir> to the run-time search path for shared libraries"
95 ;;
96
97 let mk_function_sections f =
98 if Config.function_sections then
99 "-function-sections", Arg.Unit f,
100 " Generate each function in a separate section if target supports it"
101 else
102 let err () =
103 raise (Arg.Bad "OCaml has been configured without support for \
104 -function-sections")
105 in
106 "-function-sections", Arg.Unit err, " (option not available)"
107 ;;
108
109 let mk_stop_after f =
110 "-stop-after", Arg.Symbol (Clflags.Compiler_pass.pass_names, f),
111 " Stop after the given compilation pass."
112 ;;
113
114 let mk_dtypes f =
115 "-dtypes", Arg.Unit f, " (deprecated) same as -annot"
116 ;;
117
118 let mk_for_pack_byt f =
119 "-for-pack", Arg.String f,
120 "<ident> Generate code that can later be `packed' with\n\
121 \ ocamlc -pack -o <ident>.cmo"
122 ;;
123
124 let mk_for_pack_opt f =
125 "-for-pack", Arg.String f,
126 "<ident> Generate code that can later be `packed' with\n\
127 \ ocamlopt -pack -o <ident>.cmx"
128 ;;
129
130 let mk_g_byt f =
131 "-g", Arg.Unit f, " Save debugging information"
132 ;;
133
134 let mk_g_opt f =
135 "-g", Arg.Unit f, " Record debugging information for exception backtrace"
136 ;;
137
138 let mk_i f =
139 "-i", Arg.Unit f, " Print inferred interface"
140 ;;
141
142 let mk_I f =
143 "-I", Arg.String f, "<dir> Add <dir> to the list of include directories"
144 ;;
145
146 let mk_impl f =
147 "-impl", Arg.String f, "<file> Compile <file> as a .ml file"
148 ;;
149
150 let mk_init f =
151 "-init", Arg.String f, "<file> Load <file> instead of default init file"
152 ;;
153
154 let mk_inline f =
155 "-inline", Arg.String f,
156 Printf.sprintf "<n>|<round>=<n>[,...] Aggressiveness of inlining \
157 (default %.02f, higher numbers mean more aggressive)"
158 Clflags.default_inline_threshold
159 ;;
160
161 let mk_inline_toplevel f =
162 "-inline-toplevel", Arg.String f,
163 Printf.sprintf "<n>|<round>=<n>[,...] Aggressiveness of inlining at \
164 toplevel (higher numbers mean more aggressive)"
165 ;;
166
167 let mk_inlining_report f =
168 "-inlining-report", Arg.Unit f, " Emit `.<round>.inlining' file(s) (one per \
169 round) showing the inliner's decisions"
170 ;;
171
172 let mk_dump_pass f =
173 "-dump-pass", Arg.String f,
174 Format.asprintf
175 " @[<4>Record transformations performed by these passes:@ @[%a@]@]"
176 (Format.pp_print_list
177 ~pp_sep:Format.pp_print_space
178 Format.pp_print_string)
179 !Clflags.all_passes
180 ;;
181
182 let mk_o2 f =
183 "-O2", Arg.Unit f, " Apply increased optimization for speed"
184 ;;
185
186 let mk_o3 f =
187 "-O3", Arg.Unit f, " Apply aggressive optimization for speed (may \
188 significantly increase code size and compilation time)"
189 ;;
190
191 let mk_rounds f =
192 "-rounds", Arg.Int f,
193 Printf.sprintf "<n> Repeat tree optimization and inlining phases this \
194 many times (default %d). Rounds are numbered starting from zero."
195 !Clflags.default_simplify_rounds
196 ;;
197
198 let mk_inline_max_unroll f =
199 "-inline-max-unroll", Arg.String f,
200 Printf.sprintf "<n>|<round>=<n>[,...] Unroll recursive functions at most \
201 this many times (default %d)"
202 Clflags.default_inline_max_unroll
203 ;;
204
205 let mk_classic_inlining f =
206 "-Oclassic", Arg.Unit f, " Make inlining decisions at function definition \
207 time rather than at the call site (replicates previous behaviour of the \
208 compiler)"
209 ;;
210
211 let mk_inline_cost arg descr default f =
212 Printf.sprintf "-inline-%s-cost" arg,
213 Arg.String f,
214 Printf.sprintf "<n>|<round>=<n>[,...] The cost of not removing %s during \
215 inlining (default %d, higher numbers more costly)"
216 descr
217 default
218 ;;
219
220 let mk_inline_call_cost =
221 mk_inline_cost "call" "a call" Clflags.default_inline_call_cost
222 let mk_inline_alloc_cost =
223 mk_inline_cost "alloc" "an allocation" Clflags.default_inline_alloc_cost
224 let mk_inline_prim_cost =
225 mk_inline_cost "prim" "a primitive" Clflags.default_inline_prim_cost
226 let mk_inline_branch_cost =
227 mk_inline_cost "branch" "a conditional" Clflags.default_inline_branch_cost
228 let mk_inline_indirect_cost =
229 mk_inline_cost "indirect" "an indirect call"
230 Clflags.default_inline_indirect_cost
231
232 let mk_inline_lifting_benefit f =
233 "-inline-lifting-benefit",
234 Arg.String f,
235 Printf.sprintf "<n>|<round>=<n>[,...] The benefit of lifting definitions \
236 to toplevel during inlining (default %d, higher numbers more beneficial)"
237 Clflags.default_inline_lifting_benefit
238 ;;
239
240 let mk_inline_branch_factor f =
241 "-inline-branch-factor", Arg.String f,
242 Printf.sprintf "<n>|<round>=<n>[,...] Estimate the probability of a \
243 branch being cold as 1/(1+n) (used for inlining) (default %.2f)"
244 Clflags.default_inline_branch_factor
245 ;;
246
247 let mk_intf f =
248 "-intf", Arg.String f, "<file> Compile <file> as a .mli file"
249 ;;
250
251 let mk_intf_suffix f =
252 "-intf-suffix", Arg.String f,
253 "<string> Suffix for interface files (default: .mli)"
254 ;;
255
256 let mk_intf_suffix_2 f =
257 "-intf_suffix", Arg.String f, "<string> (deprecated) same as -intf-suffix"
258 ;;
259
260 let mk_insn_sched f =
261 "-insn-sched", Arg.Unit f,
262 Printf.sprintf " Run the instruction scheduling pass%s"
263 (if Clflags.insn_sched_default then " (default)" else "")
264 ;;
265
266 let mk_no_insn_sched f =
267 "-no-insn-sched", Arg.Unit f,
268 Printf.sprintf " Do not run the instruction scheduling pass%s"
269 (if not Clflags.insn_sched_default then " (default)" else "")
270 ;;
271
272 let mk_keep_docs f =
273 "-keep-docs", Arg.Unit f, " Keep documentation strings in .cmi files"
274 ;;
275
276 let mk_no_keep_docs f =
277 "-no-keep-docs", Arg.Unit f,
278 " Do not keep documentation strings in .cmi files (default)"
279 ;;
280
281 let mk_keep_locs f =
282 "-keep-locs", Arg.Unit f, " Keep locations in .cmi files (default)"
283 ;;
284
285 let mk_no_keep_locs f =
286 "-no-keep-locs", Arg.Unit f, " Do not keep locations in .cmi files"
287 ;;
288
289 let mk_labels f =
290 "-labels", Arg.Unit f, " Use commuting label mode"
291 ;;
292
293 let mk_linkall f =
294 "-linkall", Arg.Unit f, " Link all modules, even unused ones"
295 ;;
296
297 let mk_linscan f =
298 "-linscan", Arg.Unit f, " Use the linear scan register allocator"
299 ;;
300
301 let mk_make_runtime f =
302 "-make-runtime", Arg.Unit f,
303 " Build a runtime system with given C objects and libraries"
304 ;;
305
306 let mk_make_runtime_2 f =
307 "-make_runtime", Arg.Unit f, " (deprecated) same as -make-runtime"
308 ;;
309
310 let mk_inline_max_depth f =
311 "-inline-max-depth", Arg.String f,
312 Printf.sprintf "<n>|<round>=<n>[,...] Maximum depth of search for \
313 inlining opportunities inside inlined functions (default %d)"
314 Clflags.default_inline_max_depth
315 ;;
316
317 let mk_modern f =
318 "-modern", Arg.Unit f, " (deprecated) same as -labels"
319 ;;
320
321 let mk_alias_deps f =
322 "-alias-deps", Arg.Unit f,
323 " Do record dependencies for module aliases"
324 ;;
325
326 let mk_no_alias_deps f =
327 "-no-alias-deps", Arg.Unit f,
328 " Do not record dependencies for module aliases"
329 ;;
330
331 let mk_app_funct f =
332 "-app-funct", Arg.Unit f, " Activate applicative functors"
333 ;;
334
335 let mk_no_app_funct f =
336 "-no-app-funct", Arg.Unit f, " Deactivate applicative functors"
337 ;;
338
339 let mk_no_check_prims f =
340 "-no-check-prims", Arg.Unit f, " Do not check runtime for primitives"
341 ;;
342
343 let mk_no_float_const_prop f =
344 "-no-float-const-prop", Arg.Unit f,
345 " Deactivate constant propagation for floating-point operations"
346 ;;
347
348 let mk_noassert f =
349 "-noassert", Arg.Unit f, " Do not compile assertion checks"
350 ;;
351
352 let mk_noautolink_byt f =
353 "-noautolink", Arg.Unit f,
354 " Do not automatically link C libraries specified in .cma files"
355 ;;
356
357 let mk_noautolink_opt f =
358 "-noautolink", Arg.Unit f,
359 " Do not automatically link C libraries specified in .cmxa files"
360 ;;
361
362 let mk_nodynlink f =
363 "-nodynlink", Arg.Unit f,
364 " Enable optimizations for code that will not be dynlinked"
365 ;;
366
367 let mk_noinit f =
368 "-noinit", Arg.Unit f,
369 " Do not load any init file"
370
371 let mk_nolabels f =
372 "-nolabels", Arg.Unit f, " Ignore non-optional labels in types"
373 ;;
374
375 let mk_noprompt f =
376 "-noprompt", Arg.Unit f, " Suppress all prompts"
377 ;;
378
379 let mk_nopromptcont f =
380 "-nopromptcont", Arg.Unit f,
381 " Suppress prompts for continuation lines of multi-line inputs"
382 ;;
383
384 let mk_nostdlib f =
385 "-nostdlib", Arg.Unit f,
386 " Do not add default directory to the list of include directories"
387 ;;
388
389 let mk_no_unbox_free_vars_of_closures f =
390 "-no-unbox-free-vars-of-closures", Arg.Unit f,
391 " Do not unbox variables that will appear inside function closures"
392 ;;
393
394 let mk_no_unbox_specialised_args f =
395 "-no-unbox-specialised-args", Arg.Unit f,
396 " Do not unbox arguments to which functions have been specialised"
397 ;;
398
399 let mk_o f =
400 "-o", Arg.String f, "<file> Set output file name to <file>"
401 ;;
402
403 let mk_open f =
404 "-open", Arg.String f, "<module> Opens the module <module> before typing"
405
406 let mk_output_obj f =
407 "-output-obj", Arg.Unit f, " Output an object file instead of an executable"
408 ;;
409
410 let mk_output_complete_obj f =
411 "-output-complete-obj", Arg.Unit f,
412 " Output an object file, including runtime, instead of an executable"
413 ;;
414
415 let mk_output_complete_exe f =
416 "-output-complete-exe", Arg.Unit f,
417 " Output a self-contained executable, including runtime and C stubs"
418 ;;
419
420 let mk_p f =
421 "-p", Arg.Unit f, " (no longer supported)"
422 ;;
423
424 let mk_pack_byt f =
425 "-pack", Arg.Unit f, " Package the given .cmo files into one .cmo"
426 ;;
427
428 let mk_pack_opt f =
429 "-pack", Arg.Unit f, " Package the given .cmx files into one .cmx"
430 ;;
431
432 let mk_pp f =
433 "-pp", Arg.String f, "<command> Pipe sources through preprocessor <command>"
434 ;;
435
436 let mk_ppx f =
437 "-ppx", Arg.String f,
438 "<command> Pipe abstract syntax trees through preprocessor <command>"
439 ;;
440
441 let mk_plugin f =
442 "-plugin", Arg.String f,
443 "<plugin> (no longer supported)"
444 ;;
445
446 let mk_principal f =
447 "-principal", Arg.Unit f, " Check principality of type inference"
448 ;;
449
450 let mk_no_principal f =
451 "-no-principal", Arg.Unit f,
452 " Do not check principality of type inference (default)"
453 ;;
454
455 let mk_rectypes f =
456 "-rectypes", Arg.Unit f, " Allow arbitrary recursive types"
457 ;;
458
459 let mk_no_rectypes f =
460 "-no-rectypes", Arg.Unit f,
461 " Do not allow arbitrary recursive types (default)"
462 ;;
463
464 let mk_remove_unused_arguments f =
465 "-remove-unused-arguments", Arg.Unit f,
466 " Remove unused function arguments"
467 ;;
468
469 let mk_runtime_variant f =
470 "-runtime-variant", Arg.String f,
471 "<str> Use the <str> variant of the run-time system"
472 ;;
473
474 let mk_with_runtime f =
475 "-with-runtime", Arg.Unit f,
476 "Include the runtime system in the generated program (default)"
477 ;;
478
479 let mk_without_runtime f =
480 "-without-runtime", Arg.Unit f,
481 "Do not include the runtime system in the generated program."
482 ;;
483
484 let mk_S f =
485 "-S", Arg.Unit f, " Keep intermediate assembly file"
486 ;;
487
488 let mk_safe_string f =
489 "-safe-string", Arg.Unit f,
490 if Config.safe_string then " (was set when configuring the compiler)"
491 else if Config.default_safe_string then " Make strings immutable (default)"
492 else " Make strings immutable"
493 ;;
494
495 let mk_shared f =
496 "-shared", Arg.Unit f, " Produce a dynlinkable plugin"
497 ;;
498
499 let mk_short_paths f =
500 "-short-paths", Arg.Unit f, " Shorten paths in types"
501 ;;
502
503 let mk_stdin f =
504 "-stdin", Arg.Unit f, " Read script from standard input"
505 ;;
506
507 let mk_no_strict_sequence f =
508 "-no-strict-sequence", Arg.Unit f,
509 " Left-hand part of a sequence need not have type unit (default)"
510 ;;
511
512 let mk_strict_sequence f =
513 "-strict-sequence", Arg.Unit f,
514 " Left-hand part of a sequence must have type unit"
515 ;;
516
517 let mk_thread f =
518 "-thread", Arg.Unit f,
519 " (deprecated) same as -I +threads"
520 ;;
521
522 let mk_dtimings f =
523 "-dtimings", Arg.Unit f, " Print timings information for each pass";
524 ;;
525
526 let mk_dprofile f =
527 "-dprofile", Arg.Unit f, Profile.options_doc
528 ;;
529
530 let mk_unbox_closures f =
531 "-unbox-closures", Arg.Unit f,
532 " Pass free variables via specialised arguments rather than closures"
533 ;;
534
535 let mk_unbox_closures_factor f =
536 "-unbox-closures-factor", Arg.Int f,
537 Printf.sprintf "<n > 0> Scale the size threshold above which \
538 unbox-closures will slow down indirect calls rather than duplicating a \
539 function (default %d)"
540 Clflags.default_unbox_closures_factor
541 ;;
542
543 let mk_unboxed_types f =
544 "-unboxed-types", Arg.Unit f,
545 " unannotated unboxable types will be unboxed"
546 ;;
547
548 let mk_no_unboxed_types f =
549 "-no-unboxed-types", Arg.Unit f,
550 " unannotated unboxable types will not be unboxed (default)"
551 ;;
552
553 let mk_unsafe f =
554 "-unsafe", Arg.Unit f,
555 " Do not compile bounds checking on array and string access"
556 ;;
557
558 let mk_unsafe_string f =
559 if Config.safe_string then
560 let err () =
561 raise (Arg.Bad "OCaml has been configured with -force-safe-string: \
562 -unsafe-string is not available")
563 in
564 "-unsafe-string", Arg.Unit err, " (option not available)"
565 else if Config.default_safe_string then
566 "-unsafe-string", Arg.Unit f, " Make strings mutable"
567 else
568 "-unsafe-string", Arg.Unit f, " Make strings mutable (default)"
569 ;;
570
571 let mk_use_runtime f =
572 "-use-runtime", Arg.String f,
573 "<file> Generate bytecode for the given runtime system"
574 ;;
575
576 let mk_use_runtime_2 f =
577 "-use_runtime", Arg.String f,
578 "<file> (deprecated) same as -use-runtime"
579 ;;
580
581 let mk_v f =
582 "-v", Arg.Unit f,
583 " Print compiler version and location of standard library and exit"
584 ;;
585
586 let mk_verbose f =
587 "-verbose", Arg.Unit f, " Print calls to external commands"
588 ;;
589
590 let mk_version f =
591 "-version", Arg.Unit f, " Print version and exit"
592 ;;
593
594 let mk__version f =
595 "--version", Arg.Unit f, " Print version and exit"
596 ;;
597
598 let mk_no_version f =
599 "-no-version", Arg.Unit f, " Do not print version at startup"
600 ;;
601
602 let mk_vmthread f =
603 "-vmthread", Arg.Unit f,
604 " (no longer supported)"
605 ;;
606
607 let mk_vnum f =
608 "-vnum", Arg.Unit f, " Print version number and exit"
609 ;;
610
611 let mk_w f =
612 "-w", Arg.String f,
613 Printf.sprintf
614 "<list> Enable or disable warnings according to <list>:\n\
615 \ +<spec> enable warnings in <spec>\n\
616 \ -<spec> disable warnings in <spec>\n\
617 \ @<spec> enable warnings in <spec> and treat them as errors\n\
618 \ <spec> can be:\n\
619 \ <num> a single warning number\n\
620 \ <num1>..<num2> a range of consecutive warning numbers\n\
621 \ <letter> a predefined set\n\
622 \ default setting is %S" Warnings.defaults_w
623 ;;
624
625 let mk_warn_error f =
626 "-warn-error", Arg.String f,
627 Printf.sprintf
628 "<list> Enable or disable error status for warnings according\n\
629 \ to <list>. See option -w for the syntax of <list>.\n\
630 \ Default setting is %S" Warnings.defaults_warn_error
631 ;;
632
633 let mk_warn_help f =
634 "-warn-help", Arg.Unit f, " Show description of warning numbers"
635 ;;
636
637 let mk_color f =
638 "-color", Arg.Symbol (["auto"; "always"; "never"], f),
639 Printf.sprintf
640 " Enable or disable colors in compiler messages\n\
641 \ The following settings are supported:\n\
642 \ auto use heuristics to enable colors only if supported\n\
643 \ always enable colors\n\
644 \ never disable colors\n\
645 \ The default setting is 'auto', and the current heuristic\n\
646 \ checks that the TERM environment variable exists and is\n\
647 \ not empty or \"dumb\", and that isatty(stderr) holds.\n\
648 \ If the option is not specified, these setting can alternatively\n\
649 \ be set through the OCAML_COLOR environment variable."
650 ;;
651
652 let mk_error_style f =
653 "-error-style", Arg.Symbol (["contextual"; "short"], f),
654 Printf.sprintf
655 " Control the way error messages and warnings are printed\n\
656 \ The following settings are supported:\n\
657 \ short only print the error and its location\n\
658 \ contextual like \"short\", but also display the source code\n\
659 \ snippet corresponding to the location of the error\n\
660 \ The default setting is 'contextual'.\n\
661 \ If the option is not specified, these setting can alternatively\n\
662 \ be set through the OCAML_ERROR_STYLE environment variable."
663 ;;
664
665 let mk_where f =
666 "-where", Arg.Unit f, " Print location of standard library and exit"
667 ;;
668
669 let mk_nopervasives f =
670 "-nopervasives", Arg.Unit f, " (undocumented)"
671 ;;
672
673 let mk_match_context_rows f =
674 "-match-context-rows", Arg.Int f,
675 let[@manual.ref "s:comp-options"] chapter, section = 9, 2 in
676 Printf.sprintf
677 "<n> (advanced, see manual section %d.%d.)" chapter section
678 ;;
679
680 let mk_use_prims f =
681 "-use-prims", Arg.String f, "<file> (undocumented)"
682 ;;
683
684 let mk_dump_into_file f =
685 "-dump-into-file", Arg.Unit f, " dump output like -dlambda into <target>.dump"
686 ;;
687
688 let mk_dparsetree f =
689 "-dparsetree", Arg.Unit f, " (undocumented)"
690 ;;
691
692 let mk_dtypedtree f =
693 "-dtypedtree", Arg.Unit f, " (undocumented)"
694 ;;
695
696 let mk_drawlambda f =
697 "-drawlambda", Arg.Unit f, " (undocumented)"
698 ;;
699
700 let mk_dno_unique_ids f =
701 "-dno-unique-ids", Arg.Unit f, " (undocumented)"
702 ;;
703
704 let mk_dunique_ids f =
705 "-dunique-ids", Arg.Unit f, " (undocumented)"
706 ;;
707
708 let mk_dsource f =
709 "-dsource", Arg.Unit f, " (undocumented)"
710 ;;
711
712 let mk_dlambda f =
713 "-dlambda", Arg.Unit f, " (undocumented)"
714 ;;
715
716 let mk_drawclambda f =
717 "-drawclambda", Arg.Unit f, " (undocumented)"
718 ;;
719
720 let mk_dclambda f =
721 "-dclambda", Arg.Unit f, " (undocumented)"
722 ;;
723
724 let mk_dflambda f =
725 "-dflambda", Arg.Unit f, " Print Flambda terms"
726 ;;
727
728 let mk_drawflambda f =
729 "-drawflambda", Arg.Unit f, " Print Flambda terms after closure conversion"
730 ;;
731
732 let mk_dflambda_invariants f =
733 "-dflambda-invariants", Arg.Unit f, " Check Flambda invariants \
734 around each pass"
735 ;;
736
737 let mk_dflambda_no_invariants f =
738 "-dflambda-no-invariants", Arg.Unit f, " Do not Check Flambda invariants \
739 around each pass"
740 ;;
741
742 let mk_dflambda_let f =
743 "-dflambda-let", Arg.Int f, "<stamp> Print when the given Flambda [Let] \
744 is created"
745 ;;
746
747 let mk_dflambda_verbose f =
748 "-dflambda-verbose", Arg.Unit f, " Print Flambda terms including around \
749 each pass"
750 ;;
751
752 let mk_dinstr f =
753 "-dinstr", Arg.Unit f, " (undocumented)"
754 ;;
755
756 let mk_dcamlprimc f =
757 "-dcamlprimc", Arg.Unit f, " (undocumented)"
758 ;;
759
760 let mk_dcmm f =
761 "-dcmm", Arg.Unit f, " (undocumented)"
762 ;;
763
764 let mk_dsel f =
765 "-dsel", Arg.Unit f, " (undocumented)"
766 ;;
767
768 let mk_dcombine f =
769 "-dcombine", Arg.Unit f, " (undocumented)"
770 ;;
771
772 let mk_dcse f =
773 "-dcse", Arg.Unit f, " (undocumented)"
774 ;;
775
776 let mk_dlive f =
777 "-dlive", Arg.Unit f, " (undocumented)"
778 ;;
779
780 let mk_davail f =
781 "-davail", Arg.Unit f, " Print register availability info when printing \
782 liveness"
783 ;;
784
785 let mk_drunavail f =
786 "-drunavail", Arg.Unit f, " Run register availability pass (for testing \
787 only; needs -g)"
788 ;;
789
790 let mk_dspill f =
791 "-dspill", Arg.Unit f, " (undocumented)"
792 ;;
793
794 let mk_dsplit f =
795 "-dsplit", Arg.Unit f, " (undocumented)"
796 ;;
797
798 let mk_dinterf f =
799 "-dinterf", Arg.Unit f, " (undocumented)"
800 ;;
801
802 let mk_dprefer f =
803 "-dprefer", Arg.Unit f, " (undocumented)"
804 ;;
805
806 let mk_dalloc f =
807 "-dalloc", Arg.Unit f, " (undocumented)"
808 ;;
809
810 let mk_dreload f =
811 "-dreload", Arg.Unit f, " (undocumented)"
812 ;;
813
814 let mk_dscheduling f =
815 "-dscheduling", Arg.Unit f, " (undocumented)"
816 ;;
817
818 let mk_dlinear f =
819 "-dlinear", Arg.Unit f, " (undocumented)"
820 ;;
821
822 let mk_dinterval f =
823 "-dinterval", Arg.Unit f, " (undocumented)"
824 ;;
825
826 let mk_dstartup f =
827 "-dstartup", Arg.Unit f, " (undocumented)"
828 ;;
829
830 let mk_opaque f =
831 "-opaque", Arg.Unit f,
832 " Does not generate cross-module optimization information\n\
833 \ (reduces necessary recompilation on module change)"
834 ;;
835
836 let mk_strict_formats f =
837 "-strict-formats", Arg.Unit f,
838 " Reject invalid formats accepted by legacy implementations\n\
839 \ (Warning: Invalid formats may behave differently from\n\
840 \ previous OCaml versions, and will become always-rejected\n\
841 \ in future OCaml versions. You should always use this flag\n\
842 \ to detect invalid formats so you can fix them.)"
843
844 let mk_no_strict_formats f =
845 "-no-strict-formats", Arg.Unit f,
846 " Accept invalid formats accepted by legacy implementations (default)\n\
847 \ (Warning: Invalid formats may behave differently from\n\
848 \ previous OCaml versions, and will become always-rejected\n\
849 \ in future OCaml versions. You should never use this flag\n\
850 \ and instead fix invalid formats.)"
851 ;;
852
853 let mk_args f =
854 "-args", Arg.Expand f,
855 "<file> Read additional newline-terminated command line arguments\n\
856 \ from <file>"
857 ;;
858
859 let mk_args0 f =
860 "-args0", Arg.Expand f,
861 "<file> Read additional null character terminated command line arguments\n\
862 from <file>"
863 ;;
864
865 let mk_afl_instrument f =
866 "-afl-instrument", Arg.Unit f, "Enable instrumentation for afl-fuzz"
867 ;;
868
869 let mk_afl_inst_ratio f =
870 "-afl-inst-ratio", Arg.Int f,
871 "Configure percentage of branches instrumented\n\
872 \ (advanced, see afl-fuzz docs for AFL_INST_RATIO)"
873 ;;
874
875 let mk__ f =
876 "-", Arg.String f,
877 "<file> Treat <file> as a file name (even if it starts with `-')"
878 ;;
879
880 module type Common_options = sig
881 val _absname : unit -> unit
882 val _alert : string -> unit
883 val _I : string -> unit
884 val _labels : unit -> unit
885 val _alias_deps : unit -> unit
886 val _no_alias_deps : unit -> unit
887 val _app_funct : unit -> unit
888 val _no_app_funct : unit -> unit
889 val _noassert : unit -> unit
890 val _nolabels : unit -> unit
891 val _nostdlib : unit -> unit
892 val _open : string -> unit
893 val _ppx : string -> unit
894 val _principal : unit -> unit
895 val _no_principal : unit -> unit
896 val _rectypes : unit -> unit
897 val _no_rectypes : unit -> unit
898 val _safe_string : unit -> unit
899 val _short_paths : unit -> unit
900 val _strict_sequence : unit -> unit
901 val _no_strict_sequence : unit -> unit
902 val _strict_formats : unit -> unit
903 val _no_strict_formats : unit -> unit
904 val _unboxed_types : unit -> unit
905 val _no_unboxed_types : unit -> unit
906 val _unsafe_string : unit -> unit
907 val _version : unit -> unit
908 val _vnum : unit -> unit
909 val _w : string -> unit
910
911 val anonymous : string -> unit
912 end
913
914 module type Core_options = sig
915 include Common_options
916
917 val _nopervasives : unit -> unit
918 val _unsafe : unit -> unit
919 val _warn_error : string -> unit
920 val _warn_help : unit -> unit
921
922 val _dno_unique_ids : unit -> unit
923 val _dunique_ids : unit -> unit
924 val _dsource : unit -> unit
925 val _dparsetree : unit -> unit
926 val _dtypedtree : unit -> unit
927 val _drawlambda : unit -> unit
928 val _dlambda : unit -> unit
929
930 end
931
932 module type Compiler_options = sig
933 val _a : unit -> unit
934 val _annot : unit -> unit
935 val _binannot : unit -> unit
936 val _c : unit -> unit
937 val _cc : string -> unit
938 val _cclib : string -> unit
939 val _ccopt : string -> unit
940 val _config : unit -> unit
941 val _config_var : string -> unit
942 val _for_pack : string -> unit
943 val _g : unit -> unit
944 val _stop_after : string -> unit
945 val _i : unit -> unit
946 val _impl : string -> unit
947 val _intf : string -> unit
948 val _intf_suffix : string -> unit
949 val _keep_docs : unit -> unit
950 val _no_keep_docs : unit -> unit
951 val _keep_locs : unit -> unit
952 val _no_keep_locs : unit -> unit
953 val _linkall : unit -> unit
954 val _noautolink : unit -> unit
955 val _o : string -> unit
956 val _opaque : unit -> unit
957 val _output_obj : unit -> unit
958 val _output_complete_obj : unit -> unit
959 val _pack : unit -> unit
960 val _plugin : string -> unit
961 val _pp : string -> unit
962 val _principal : unit -> unit
963 val _no_principal : unit -> unit
964 val _rectypes : unit -> unit
965 val _runtime_variant : string -> unit
966 val _with_runtime : unit -> unit
967 val _without_runtime : unit -> unit
968 val _safe_string : unit -> unit
969 val _short_paths : unit -> unit
970 val _thread : unit -> unit
971 val _v : unit -> unit
972 val _verbose : unit -> unit
973 val _where : unit -> unit
974 val _color : string -> unit
975 val _error_style : string -> unit
976
977 val _match_context_rows : int -> unit
978 val _dtimings : unit -> unit
979 val _dprofile : unit -> unit
980 val _dump_into_file : unit -> unit
981
982 val _args: string -> string array
983 val _args0: string -> string array
984 end
985 ;;
986
987 module type Toplevel_options = sig
988 include Core_options
989 val _init : string -> unit
990 val _noinit : unit -> unit
991 val _no_version : unit -> unit
992 val _noprompt : unit -> unit
993 val _nopromptcont : unit -> unit
994 val _stdin : unit -> unit
995 val _args : string -> string array
996 val _args0 : string -> string array
997 val _color : string -> unit
998 val _error_style : string -> unit
999 end
1000 ;;
1001
1002 module type Bytecomp_options = sig
1003 include Core_options
1004 include Compiler_options
1005 val _compat_32 : unit -> unit
1006 val _custom : unit -> unit
1007 val _no_check_prims : unit -> unit
1008 val _dllib : string -> unit
1009 val _dllpath : string -> unit
1010 val _make_runtime : unit -> unit
1011 val _vmthread : unit -> unit
1012 val _use_runtime : string -> unit
1013 val _output_complete_exe : unit -> unit
1014
1015 val _dinstr : unit -> unit
1016 val _dcamlprimc : unit -> unit
1017
1018 val _use_prims : string -> unit
1019 end;;
1020
1021 module type Bytetop_options = sig
1022 include Toplevel_options
1023 val _dinstr : unit -> unit
1024
1025 end;;
1026
1027 module type Optcommon_options = sig
1028 val _compact : unit -> unit
1029 val _inline : string -> unit
1030 val _inline_toplevel : string -> unit
1031 val _inlining_report : unit -> unit
1032 val _dump_pass : string -> unit
1033 val _inline_max_depth : string -> unit
1034 val _rounds : int -> unit
1035 val _inline_max_unroll : string -> unit
1036 val _classic_inlining : unit -> unit
1037 val _inline_call_cost : string -> unit
1038 val _inline_alloc_cost : string -> unit
1039 val _inline_prim_cost : string -> unit
1040 val _inline_branch_cost : string -> unit
1041 val _inline_indirect_cost : string -> unit
1042 val _inline_lifting_benefit : string -> unit
1043 val _unbox_closures : unit -> unit
1044 val _unbox_closures_factor : int -> unit
1045 val _inline_branch_factor : string -> unit
1046 val _remove_unused_arguments : unit -> unit
1047 val _no_unbox_free_vars_of_closures : unit -> unit
1048 val _no_unbox_specialised_args : unit -> unit
1049 val _o2 : unit -> unit
1050 val _o3 : unit -> unit
1051 val _insn_sched : unit -> unit
1052 val _no_insn_sched : unit -> unit
1053 val _linscan : unit -> unit
1054 val _no_float_const_prop : unit -> unit
1055
1056 val _clambda_checks : unit -> unit
1057 val _dflambda : unit -> unit
1058 val _drawflambda : unit -> unit
1059 val _dflambda_invariants : unit -> unit
1060 val _dflambda_no_invariants : unit -> unit
1061 val _dflambda_let : int -> unit
1062 val _dflambda_verbose : unit -> unit
1063 val _drawclambda : unit -> unit
1064 val _dclambda : unit -> unit
1065 val _dcmm : unit -> unit
1066 val _dsel : unit -> unit
1067 val _dcombine : unit -> unit
1068 val _dcse : unit -> unit
1069 val _dlive : unit -> unit
1070 val _davail : unit -> unit
1071 val _drunavail : unit -> unit
1072 val _dspill : unit -> unit
1073 val _dsplit : unit -> unit
1074 val _dinterf : unit -> unit
1075 val _dprefer : unit -> unit
1076 val _dalloc : unit -> unit
1077 val _dreload : unit -> unit
1078 val _dscheduling : unit -> unit
1079 val _dlinear : unit -> unit
1080 val _dinterval : unit -> unit
1081 val _dstartup : unit -> unit
1082 end;;
1083
1084 module type Optcomp_options = sig
1085 include Core_options
1086 include Compiler_options
1087 include Optcommon_options
1088 val _nodynlink : unit -> unit
1089 val _p : unit -> unit
1090 val _pp : string -> unit
1091 val _S : unit -> unit
1092 val _shared : unit -> unit
1093 val _afl_instrument : unit -> unit
1094 val _afl_inst_ratio : int -> unit
1095 val _function_sections : unit -> unit
1096 end;;
1097
1098 module type Opttop_options = sig
1099 include Toplevel_options
1100 include Optcommon_options
1101 val _verbose : unit -> unit
1102 val _S : unit -> unit
1103 end;;
1104
1105 module type Ocamldoc_options = sig
1106 include Common_options
1107 val _impl : string -> unit
1108 val _intf : string -> unit
1109 val _intf_suffix : string -> unit
1110 val _pp : string -> unit
1111 val _thread : unit -> unit
1112 val _v : unit -> unit
1113 val _verbose : unit -> unit
1114 val _vmthread : unit -> unit
1115 end
1116
1117 module type Arg_list = sig
1118 val list : (string * Arg.spec * string) list
1119 end;;
1120
1121 module Make_bytecomp_options (F : Bytecomp_options) =
1122 struct
1123 let list = [
1124 mk_a F._a;
1125 mk_alert F._alert;
1126 mk_absname F._absname;
1127 mk_annot F._annot;
1128 mk_binannot F._binannot;
1129 mk_c F._c;
1130 mk_cc F._cc;
1131 mk_cclib F._cclib;
1132 mk_ccopt F._ccopt;
1133 mk_color F._color;
1134 mk_error_style F._error_style;
1135 mk_compat_32 F._compat_32;
1136 mk_config F._config;
1137 mk_config_var F._config_var;
1138 mk_custom F._custom;
1139 mk_dllib F._dllib;
1140 mk_dllpath F._dllpath;
1141 mk_dtypes F._annot;
1142 mk_for_pack_byt F._for_pack;
1143 mk_g_byt F._g;
1144 mk_stop_after F._stop_after;
1145 mk_i F._i;
1146 mk_I F._I;
1147 mk_impl F._impl;
1148 mk_intf F._intf;
1149 mk_intf_suffix F._intf_suffix;
1150 mk_intf_suffix_2 F._intf_suffix;
1151 mk_keep_docs F._keep_docs;
1152 mk_no_keep_docs F._no_keep_docs;
1153 mk_keep_locs F._keep_locs;
1154 mk_no_keep_locs F._no_keep_locs;
1155 mk_labels F._labels;
1156 mk_linkall F._linkall;
1157 mk_make_runtime F._make_runtime;
1158 mk_make_runtime_2 F._make_runtime;
1159 mk_modern F._labels;
1160 mk_alias_deps F._alias_deps;
1161 mk_no_alias_deps F._no_alias_deps;
1162 mk_app_funct F._app_funct;
1163 mk_no_app_funct F._no_app_funct;
1164 mk_no_check_prims F._no_check_prims;
1165 mk_noassert F._noassert;
1166 mk_noautolink_byt F._noautolink;
1167 mk_nolabels F._nolabels;
1168 mk_nostdlib F._nostdlib;
1169 mk_nopervasives F._nopervasives;
1170 mk_o F._o;
1171 mk_opaque F._opaque;
1172 mk_open F._open;
1173 mk_output_obj F._output_obj;
1174 mk_output_complete_obj F._output_complete_obj;
1175 mk_output_complete_exe F._output_complete_exe;
1176 mk_pack_byt F._pack;
1177 mk_pp F._pp;
1178 mk_ppx F._ppx;
1179 mk_plugin F._plugin;
1180 mk_principal F._principal;
1181 mk_no_principal F._no_principal;
1182 mk_rectypes F._rectypes;
1183 mk_no_rectypes F._no_rectypes;
1184 mk_runtime_variant F._runtime_variant;
1185 mk_with_runtime F._with_runtime;
1186 mk_without_runtime F._without_runtime;
1187 mk_safe_string F._safe_string;
1188 mk_short_paths F._short_paths;
1189 mk_strict_sequence F._strict_sequence;
1190 mk_no_strict_sequence F._no_strict_sequence;
1191 mk_strict_formats F._strict_formats;
1192 mk_no_strict_formats F._no_strict_formats;
1193 mk_thread F._thread;
1194 mk_unboxed_types F._unboxed_types;
1195 mk_no_unboxed_types F._no_unboxed_types;
1196 mk_unsafe F._unsafe;
1197 mk_unsafe_string F._unsafe_string;
1198 mk_use_runtime F._use_runtime;
1199 mk_use_runtime_2 F._use_runtime;
1200 mk_v F._v;
1201 mk_verbose F._verbose;
1202 mk_version F._version;
1203 mk__version F._version;
1204 mk_vmthread F._vmthread;
1205 mk_vnum F._vnum;
1206 mk_w F._w;
1207 mk_warn_error F._warn_error;
1208 mk_warn_help F._warn_help;
1209 mk_where F._where;
1210 mk__ F.anonymous;
1211
1212 mk_match_context_rows F._match_context_rows;
1213 mk_use_prims F._use_prims;
1214 mk_dno_unique_ids F._dno_unique_ids;
1215 mk_dunique_ids F._dunique_ids;
1216 mk_dsource F._dsource;
1217 mk_dparsetree F._dparsetree;
1218 mk_dtypedtree F._dtypedtree;
1219 mk_drawlambda F._drawlambda;
1220 mk_dlambda F._dlambda;
1221 mk_dinstr F._dinstr;
1222 mk_dcamlprimc F._dcamlprimc;
1223 mk_dtimings F._dtimings;
1224 mk_dprofile F._dprofile;
1225 mk_dump_into_file F._dump_into_file;
1226
1227 mk_args F._args;
1228 mk_args0 F._args0;
1229 ]
1230 end;;
1231
1232 module Make_bytetop_options (F : Bytetop_options) =
1233 struct
1234 let list = [
1235 mk_absname F._absname;
1236 mk_alert F._alert;
1237 mk_I F._I;
1238 mk_init F._init;
1239 mk_labels F._labels;
1240 mk_alias_deps F._alias_deps;
1241 mk_no_alias_deps F._no_alias_deps;
1242 mk_app_funct F._app_funct;
1243 mk_no_app_funct F._no_app_funct;
1244 mk_noassert F._noassert;
1245 mk_noinit F._noinit;
1246 mk_nolabels F._nolabels;
1247 mk_noprompt F._noprompt;
1248 mk_nopromptcont F._nopromptcont;
1249 mk_nostdlib F._nostdlib;
1250 mk_nopervasives F._nopervasives;
1251 mk_open F._open;
1252 mk_ppx F._ppx;
1253 mk_principal F._principal;
1254 mk_no_principal F._no_principal;
1255 mk_rectypes F._rectypes;
1256 mk_no_rectypes F._no_rectypes;
1257 mk_safe_string F._safe_string;
1258 mk_short_paths F._short_paths;
1259 mk_stdin F._stdin;
1260 mk_strict_sequence F._strict_sequence;
1261 mk_no_strict_sequence F._no_strict_sequence;
1262 mk_strict_formats F._strict_formats;
1263 mk_no_strict_formats F._no_strict_formats;
1264 mk_unboxed_types F._unboxed_types;
1265 mk_no_unboxed_types F._no_unboxed_types;
1266 mk_unsafe F._unsafe;
1267 mk_unsafe_string F._unsafe_string;
1268 mk_version F._version;
1269 mk__version F._version;
1270 mk_no_version F._no_version;
1271 mk_vnum F._vnum;
1272 mk_w F._w;
1273 mk_warn_error F._warn_error;
1274 mk_warn_help F._warn_help;
1275 mk__ F.anonymous;
1276 mk_color F._color;
1277 mk_error_style F._error_style;
1278
1279 mk_dno_unique_ids F._dno_unique_ids;
1280 mk_dunique_ids F._dunique_ids;
1281 mk_dsource F._dsource;
1282 mk_dparsetree F._dparsetree;
1283 mk_dtypedtree F._dtypedtree;
1284 mk_drawlambda F._drawlambda;
1285 mk_dlambda F._dlambda;
1286 mk_dinstr F._dinstr;
1287
1288 mk_args F._args;
1289 mk_args0 F._args0;
1290 ]
1291 end;;
1292
1293 module Make_optcomp_options (F : Optcomp_options) =
1294 struct
1295 let list = [
1296 mk_a F._a;
1297 mk_alert F._alert;
1298 mk_absname F._absname;
1299 mk_afl_instrument F._afl_instrument;
1300 mk_afl_inst_ratio F._afl_inst_ratio;
1301 mk_annot F._annot;
1302 mk_binannot F._binannot;
1303 mk_inline_branch_factor F._inline_branch_factor;
1304 mk_c F._c;
1305 mk_cc F._cc;
1306 mk_cclib F._cclib;
1307 mk_ccopt F._ccopt;
1308 mk_clambda_checks F._clambda_checks;
1309 mk_classic_inlining F._classic_inlining;
1310 mk_color F._color;
1311 mk_error_style F._error_style;
1312 mk_compact F._compact;
1313 mk_config F._config;
1314 mk_config_var F._config_var;
1315 mk_dtypes F._annot;
1316 mk_for_pack_opt F._for_pack;
1317 mk_g_opt F._g;
1318 mk_function_sections F._function_sections;
1319 mk_stop_after F._stop_after;
1320 mk_i F._i;
1321 mk_I F._I;
1322 mk_impl F._impl;
1323 mk_inline F._inline;
1324 mk_inline_toplevel F._inline_toplevel;
1325 mk_inline_alloc_cost F._inline_alloc_cost;
1326 mk_inline_branch_cost F._inline_branch_cost;
1327 mk_inline_call_cost F._inline_call_cost;
1328 mk_inline_prim_cost F._inline_prim_cost;
1329 mk_inline_indirect_cost F._inline_indirect_cost;
1330 mk_inline_lifting_benefit F._inline_lifting_benefit;
1331 mk_inlining_report F._inlining_report;
1332 mk_insn_sched F._insn_sched;
1333 mk_intf F._intf;
1334 mk_intf_suffix F._intf_suffix;
1335 mk_keep_docs F._keep_docs;
1336 mk_no_keep_docs F._no_keep_docs;
1337 mk_keep_locs F._keep_locs;
1338 mk_no_keep_locs F._no_keep_locs;
1339 mk_labels F._labels;
1340 mk_linkall F._linkall;
1341 mk_inline_max_depth F._inline_max_depth;
1342 mk_alias_deps F._alias_deps;
1343 mk_no_alias_deps F._no_alias_deps;
1344 mk_linscan F._linscan;
1345 mk_app_funct F._app_funct;
1346 mk_no_app_funct F._no_app_funct;
1347 mk_no_float_const_prop F._no_float_const_prop;
1348 mk_noassert F._noassert;
1349 mk_noautolink_opt F._noautolink;
1350 mk_nodynlink F._nodynlink;
1351 mk_no_insn_sched F._no_insn_sched;
1352 mk_nolabels F._nolabels;
1353 mk_nostdlib F._nostdlib;
1354 mk_nopervasives F._nopervasives;
1355 mk_no_unbox_free_vars_of_closures F._no_unbox_free_vars_of_closures;
1356 mk_no_unbox_specialised_args F._no_unbox_specialised_args;
1357 mk_o F._o;
1358 mk_o2 F._o2;
1359 mk_o3 F._o3;
1360 mk_opaque F._opaque;
1361 mk_open F._open;
1362 mk_output_obj F._output_obj;
1363 mk_output_complete_obj F._output_complete_obj;
1364 mk_p F._p;
1365 mk_pack_opt F._pack;
1366 mk_plugin F._plugin;
1367 mk_pp F._pp;
1368 mk_ppx F._ppx;
1369 mk_principal F._principal;
1370 mk_no_principal F._no_principal;
1371 mk_rectypes F._rectypes;
1372 mk_no_rectypes F._no_rectypes;
1373 mk_remove_unused_arguments F._remove_unused_arguments;
1374 mk_rounds F._rounds;
1375 mk_runtime_variant F._runtime_variant;
1376 mk_with_runtime F._with_runtime;
1377 mk_without_runtime F._without_runtime;
1378 mk_S F._S;
1379 mk_safe_string F._safe_string;
1380 mk_shared F._shared;
1381 mk_short_paths F._short_paths;
1382 mk_strict_sequence F._strict_sequence;
1383 mk_no_strict_sequence F._no_strict_sequence;
1384 mk_strict_formats F._strict_formats;
1385 mk_no_strict_formats F._no_strict_formats;
1386 mk_thread F._thread;
1387 mk_unbox_closures F._unbox_closures;
1388 mk_unbox_closures_factor F._unbox_closures_factor;
1389 mk_inline_max_unroll F._inline_max_unroll;
1390 mk_unboxed_types F._unboxed_types;
1391 mk_no_unboxed_types F._no_unboxed_types;
1392 mk_unsafe F._unsafe;
1393 mk_unsafe_string F._unsafe_string;
1394 mk_v F._v;
1395 mk_verbose F._verbose;
1396 mk_version F._version;
1397 mk__version F._version;
1398 mk_vnum F._vnum;
1399 mk_w F._w;
1400 mk_warn_error F._warn_error;
1401 mk_warn_help F._warn_help;
1402 mk_where F._where;
1403 mk__ F.anonymous;
1404
1405 mk_match_context_rows F._match_context_rows;
1406 mk_dno_unique_ids F._dno_unique_ids;
1407 mk_dunique_ids F._dunique_ids;
1408 mk_dsource F._dsource;
1409 mk_dparsetree F._dparsetree;
1410 mk_dtypedtree F._dtypedtree;
1411 mk_drawlambda F._drawlambda;
1412 mk_dlambda F._dlambda;
1413 mk_drawclambda F._drawclambda;
1414 mk_dclambda F._dclambda;
1415 mk_dflambda F._dflambda;
1416 mk_drawflambda F._drawflambda;
1417 mk_dflambda_invariants F._dflambda_invariants;
1418 mk_dflambda_no_invariants F._dflambda_no_invariants;
1419 mk_dflambda_let F._dflambda_let;
1420 mk_dflambda_verbose F._dflambda_verbose;
1421 mk_dcmm F._dcmm;
1422 mk_dsel F._dsel;
1423 mk_dcombine F._dcombine;
1424 mk_dcse F._dcse;
1425 mk_dlive F._dlive;
1426 mk_davail F._davail;
1427 mk_drunavail F._drunavail;
1428 mk_dspill F._dspill;
1429 mk_dsplit F._dsplit;
1430 mk_dinterf F._dinterf;
1431 mk_dprefer F._dprefer;
1432 mk_dalloc F._dalloc;
1433 mk_dreload F._dreload;
1434 mk_dscheduling F._dscheduling;
1435 mk_dlinear F._dlinear;
1436 mk_dinterval F._dinterval;
1437 mk_dstartup F._dstartup;
1438 mk_dtimings F._dtimings;
1439 mk_dprofile F._dprofile;
1440 mk_dump_into_file F._dump_into_file;
1441 mk_dump_pass F._dump_pass;
1442
1443 mk_args F._args;
1444 mk_args0 F._args0;
1445 ]
1446 end;;
1447
1448 module Make_opttop_options (F : Opttop_options) = struct
1449 let list = [
1450 mk_absname F._absname;
1451 mk_alert F._alert;
1452 mk_compact F._compact;
1453 mk_I F._I;
1454 mk_init F._init;
1455 mk_inline F._inline;
1456 mk_inline_toplevel F._inline_toplevel;
1457 mk_inlining_report F._inlining_report;
1458 mk_rounds F._rounds;
1459 mk_inline_max_unroll F._inline_max_unroll;
1460 mk_classic_inlining F._classic_inlining;
1461 mk_inline_call_cost F._inline_call_cost;
1462 mk_inline_alloc_cost F._inline_alloc_cost;
1463 mk_inline_prim_cost F._inline_prim_cost;
1464 mk_inline_branch_cost F._inline_branch_cost;
1465 mk_inline_indirect_cost F._inline_indirect_cost;
1466 mk_inline_lifting_benefit F._inline_lifting_benefit;
1467 mk_inline_branch_factor F._inline_branch_factor;
1468 mk_labels F._labels;
1469 mk_alias_deps F._alias_deps;
1470 mk_no_alias_deps F._no_alias_deps;
1471 mk_linscan F._linscan;
1472 mk_app_funct F._app_funct;
1473 mk_no_app_funct F._no_app_funct;
1474 mk_no_float_const_prop F._no_float_const_prop;
1475 mk_noassert F._noassert;
1476 mk_noinit F._noinit;
1477 mk_nolabels F._nolabels;
1478 mk_noprompt F._noprompt;
1479 mk_nopromptcont F._nopromptcont;
1480 mk_nostdlib F._nostdlib;
1481 mk_nopervasives F._nopervasives;
1482 mk_no_unbox_free_vars_of_closures F._no_unbox_free_vars_of_closures;
1483 mk_no_unbox_specialised_args F._no_unbox_specialised_args;
1484 mk_o2 F._o2;
1485 mk_o3 F._o3;
1486 mk_open F._open;
1487 mk_ppx F._ppx;
1488 mk_principal F._principal;
1489 mk_no_principal F._no_principal;
1490 mk_rectypes F._rectypes;
1491 mk_no_rectypes F._no_rectypes;
1492 mk_remove_unused_arguments F._remove_unused_arguments;
1493 mk_S F._S;
1494 mk_safe_string F._safe_string;
1495 mk_short_paths F._short_paths;
1496 mk_stdin F._stdin;
1497 mk_strict_sequence F._strict_sequence;
1498 mk_no_strict_sequence F._no_strict_sequence;
1499 mk_strict_formats F._strict_formats;
1500 mk_no_strict_formats F._no_strict_formats;
1501 mk_unbox_closures F._unbox_closures;
1502 mk_unbox_closures_factor F._unbox_closures_factor;
1503 mk_unboxed_types F._unboxed_types;
1504 mk_no_unboxed_types F._no_unboxed_types;
1505 mk_unsafe F._unsafe;
1506 mk_unsafe_string F._unsafe_string;
1507 mk_verbose F._verbose;
1508 mk_version F._version;
1509 mk__version F._version;
1510 mk_no_version F._no_version;
1511 mk_vnum F._vnum;
1512 mk_w F._w;
1513 mk_warn_error F._warn_error;
1514 mk_warn_help F._warn_help;
1515 mk__ F.anonymous;
1516 mk_color F._color;
1517 mk_error_style F._error_style;
1518
1519 mk_dsource F._dsource;
1520 mk_dparsetree F._dparsetree;
1521 mk_dtypedtree F._dtypedtree;
1522 mk_drawlambda F._drawlambda;
1523 mk_drawclambda F._drawclambda;
1524 mk_dclambda F._dclambda;
1525 mk_drawflambda F._drawflambda;
1526 mk_dflambda F._dflambda;
1527 mk_dcmm F._dcmm;
1528 mk_dsel F._dsel;
1529 mk_dcombine F._dcombine;
1530 mk_dcse F._dcse;
1531 mk_dlive F._dlive;
1532 mk_davail F._davail;
1533 mk_drunavail F._drunavail;
1534 mk_dspill F._dspill;
1535 mk_dsplit F._dsplit;
1536 mk_dinterf F._dinterf;
1537 mk_dprefer F._dprefer;
1538 mk_dalloc F._dalloc;
1539 mk_dreload F._dreload;
1540 mk_dscheduling F._dscheduling;
1541 mk_dlinear F._dlinear;
1542 mk_dinterval F._dinterval;
1543 mk_dstartup F._dstartup;
1544 mk_dump_pass F._dump_pass;
1545 ]
1546 end;;
1547
1548 module Make_ocamldoc_options (F : Ocamldoc_options) =
1549 struct
1550 let list = [
1551 mk_absname F._absname;
1552 mk_alert F._alert;
1553 mk_I F._I;
1554 mk_impl F._impl;
1555 mk_intf F._intf;
1556 mk_intf_suffix F._intf_suffix;
1557 mk_intf_suffix_2 F._intf_suffix;
1558 mk_labels F._labels;
1559 mk_modern F._labels;
1560 mk_alias_deps F._alias_deps;
1561 mk_no_alias_deps F._no_alias_deps;
1562 mk_app_funct F._app_funct;
1563 mk_no_app_funct F._no_app_funct;
1564 mk_noassert F._noassert;
1565 mk_nolabels F._nolabels;
1566 mk_nostdlib F._nostdlib;
1567 mk_open F._open;
1568 mk_pp F._pp;
1569 mk_ppx F._ppx;
1570 mk_principal F._principal;
1571 mk_no_principal F._no_principal;
1572 mk_rectypes F._rectypes;
1573 mk_no_rectypes F._no_rectypes;
1574 mk_safe_string F._safe_string;
1575 mk_short_paths F._short_paths;
1576 mk_strict_sequence F._strict_sequence;
1577 mk_no_strict_sequence F._no_strict_sequence;
1578 mk_strict_formats F._strict_formats;
1579 mk_no_strict_formats F._no_strict_formats;
1580 mk_thread F._thread;
1581 mk_unboxed_types F._unboxed_types;
1582 mk_no_unboxed_types F._no_unboxed_types;
1583 mk_unsafe_string F._unsafe_string;
1584 mk_v F._v;
1585 mk_verbose F._verbose;
1586 mk_version F._version;
1587 mk__version F._version;
1588 mk_vmthread F._vmthread;
1589 mk_vnum F._vnum;
1590 mk_w F._w;
1591 mk__ F.anonymous;
1592 ]
1593 end;;
1594
1595 [@@@ocaml.warning "-40"]
1596 let options_with_command_line_syntax_inner r after_rest =
1597 let rec loop ~name_opt (spec : Arg.spec) : Arg.spec =
1598 let option =
1599 match name_opt with
1600 | None -> ignore
1601 | Some name -> (fun () -> r := name :: !r)
1602 in
1603 let arg a = r := Filename.quote a :: !r in
1604 let option_with_arg a = option (); arg a in
1605 let rest a =
1606 if not !after_rest then (after_rest := true; option ());
1607 arg a
1608 in
1609 match spec with
1610 | Unit f -> Unit (fun a -> f a; option ())
1611 | Bool f -> Bool (fun a -> f a; option_with_arg (string_of_bool a))
1612 | Set r -> Unit (fun () -> r := true; option ())
1613 | Clear r -> Unit (fun () -> r := false; option ())
1614 | String f -> String (fun a -> f a; option_with_arg a)
1615 | Set_string r -> String (fun a -> r := a; option_with_arg a)
1616 | Int f -> Int (fun a -> f a; option_with_arg (string_of_int a))
1617 | Set_int r -> Int (fun a -> r := a; option_with_arg (string_of_int a))
1618 | Float f -> Float (fun a -> f a; option_with_arg (string_of_float a))
1619 | Set_float r ->
1620 Float (fun a -> r := a; option_with_arg (string_of_float a))
1621 | Tuple [] -> Unit option
1622 | Tuple (hd :: tl) ->
1623 Tuple (loop ~name_opt hd :: List.map (loop ~name_opt:None) tl)
1624 | Symbol (l, f) -> Symbol (l, (fun a -> f a; option_with_arg a))
1625 | Rest f -> Rest (fun a -> f a; rest a)
1626 | Expand f -> Expand f
1627 in
1628 loop
1629
1630 let options_with_command_line_syntax options r =
1631 let rest = ref false in
1632 List.map (fun (name, spec, doc) ->
1633 (name,
1634 options_with_command_line_syntax_inner r rest
1635 ~name_opt:(Some name) spec, doc)
1636 ) options
1637
1638 module Default = struct
1639 open Clflags
1640 open Compenv
1641 let set r () = r := true
1642 let clear r () = r := false
1643
1644 module Common = struct
1645 let _absname = set Clflags.absname
1646 let _alert = Warnings.parse_alert_option
1647 let _alias_deps = clear transparent_modules
1648 let _app_funct = set applicative_functors
1649 let _labels = clear classic
1650 let _no_alias_deps = set transparent_modules
1651 let _no_app_funct = clear applicative_functors
1652 let _no_principal = clear principal
1653 let _no_rectypes = clear recursive_types
1654 let _no_strict_formats = clear strict_formats
1655 let _no_strict_sequence = clear strict_sequence
1656 let _no_unboxed_types = clear unboxed_types
1657 let _noassert = set noassert
1658 let _nolabels = set classic
1659 let _nostdlib = set no_std_include
1660 let _open s = open_modules := (s :: (!open_modules))
1661 let _principal = set principal
1662 let _rectypes = set recursive_types
1663 let _safe_string = clear unsafe_string
1664 let _short_paths = clear real_paths
1665 let _strict_formats = set strict_formats
1666 let _strict_sequence = set strict_sequence
1667 let _unboxed_types = set unboxed_types
1668 let _unsafe_string = set unsafe_string
1669 let _w s = Warnings.parse_options false s
1670
1671 let anonymous = anonymous
1672
1673 end
1674
1675 module Core = struct
1676 include Common
1677 let _I dir = include_dirs := (dir :: (!include_dirs))
1678 let _color = Misc.set_or_ignore color_reader.parse color
1679 let _dlambda = set dump_lambda
1680 let _dno_unique_ids = clear unique_ids
1681 let _dparsetree = set dump_parsetree
1682 let _drawlambda = set dump_rawlambda
1683 let _dsource = set dump_source
1684 let _dtypedtree = set dump_typedtree
1685 let _dunique_ids = set unique_ids
1686 let _error_style =
1687 Misc.set_or_ignore error_style_reader.parse error_style
1688 let _nopervasives = set nopervasives
1689 let _ppx s = first_ppx := (s :: (!first_ppx))
1690 let _unsafe = set unsafe
1691 let _warn_error s = Warnings.parse_options true s
1692 let _warn_help = Warnings.help_warnings
1693 end
1694
1695 module Native = struct
1696 let _S = set keep_asm_file
1697 let _clambda_checks () = clambda_checks := true
1698 let _classic_inlining () = classic_inlining := true
1699 let _compact = clear optimize_for_speed
1700 let _dalloc = set dump_regalloc
1701 let _davail () = dump_avail := true
1702 let _dclambda = set dump_clambda
1703 let _dcmm = set dump_cmm
1704 let _dcombine = set dump_combine
1705 let _dcse = set dump_cse
1706 let _dflambda = set dump_flambda
1707 let _dflambda_invariants = set flambda_invariant_checks
1708 let _dflambda_let stamp = dump_flambda_let := (Some stamp)
1709 let _dflambda_no_invariants = clear flambda_invariant_checks
1710 let _dflambda_verbose () =
1711 set dump_flambda (); set dump_flambda_verbose ()
1712 let _dinterval = set dump_interval
1713 let _dinterf = set dump_interf
1714 let _dlinear = set dump_linear
1715 let _dlive () = dump_live := true
1716 let _dprefer = set dump_prefer
1717 let _drawclambda = set dump_rawclambda
1718 let _drawflambda = set dump_rawflambda
1719 let _dreload = set dump_reload
1720 let _drunavail () = debug_runavail := true
1721 let _dscheduling = set dump_scheduling
1722 let _dsel = set dump_selection
1723 let _dspill = set dump_spill
1724 let _dsplit = set dump_split
1725 let _dstartup = set keep_startup_file
1726 let _dump_pass pass = set_dumped_pass pass true
1727 let _inline spec =
1728 Float_arg_helper.parse spec "Syntax: -inline <n> | <round>=<n>[,...]"
1729 inline_threshold
1730 let _inline_alloc_cost spec =
1731 Int_arg_helper.parse spec
1732 "Syntax: -inline-alloc-cost <n> | <round>=<n>[,...]"
1733 inline_alloc_cost
1734 let _inline_branch_cost spec =
1735 Int_arg_helper.parse spec
1736 "Syntax: -inline-branch-cost <n> | <round>=<n>[,...]"
1737 inline_branch_cost
1738 let _inline_branch_factor spec =
1739 Float_arg_helper.parse spec
1740 "Syntax: -inline-branch-factor <n> | <round>=<n>[,...]"
1741 inline_branch_factor
1742 let _inline_call_cost spec =
1743 Int_arg_helper.parse spec
1744 "Syntax: -inline-call-cost <n> | <round>=<n>[,...]" inline_call_cost
1745 let _inline_indirect_cost spec =
1746 Int_arg_helper.parse spec
1747 "Syntax: -inline-indirect-cost <n> | <round>=<n>[,...]"
1748 inline_indirect_cost
1749 let _inline_lifting_benefit spec =
1750 Int_arg_helper.parse spec
1751 "Syntax: -inline-lifting-benefit <n> | <round>=<n>[,...]"
1752 inline_lifting_benefit
1753 let _inline_max_depth spec =
1754 Int_arg_helper.parse spec
1755 "Syntax: -inline-max-depth <n> | <round>=<n>[,...]" inline_max_depth
1756 let _inline_max_unroll spec =
1757 Int_arg_helper.parse spec
1758 "Syntax: -inline-max-unroll <n> | <round>=<n>[,...]"
1759 inline_max_unroll
1760 let _inline_prim_cost spec =
1761 Int_arg_helper.parse spec
1762 "Syntax: -inline-prim-cost <n> | <round>=<n>[,...]" inline_prim_cost
1763 let _inline_toplevel spec =
1764 Int_arg_helper.parse spec
1765 "Syntax: -inline-toplevel <n> | <round>=<n>[,...]"
1766 inline_toplevel_threshold
1767 let _inlining_report () = inlining_report := true
1768 let _insn_sched = set insn_sched
1769 let _no_insn_sched = clear insn_sched
1770 let _linscan = set use_linscan
1771 let _no_float_const_prop = clear float_const_prop
1772 let _no_unbox_free_vars_of_closures = clear unbox_free_vars_of_closures
1773 let _no_unbox_specialised_args = clear unbox_specialised_args
1774 (* CR-someday mshinwell: should stop e.g. -O2 -classic-inlining
1775 lgesbert: could be done in main() below, like for -pack and -c, but that
1776 would prevent overriding using OCAMLPARAM.
1777 mshinwell: We're going to defer this for the moment and add a note in
1778 the manual that the behaviour is unspecified in cases such as this.
1779 We should refactor the code so that the user's requirements are
1780 collected, then checked all at once for illegal combinations, and then
1781 transformed into the settings of the individual parameters.
1782 *)
1783 let _o2 () =
1784 default_simplify_rounds := 2;
1785 use_inlining_arguments_set o2_arguments;
1786 use_inlining_arguments_set ~round:0 o1_arguments
1787 let _o3 () =
1788 default_simplify_rounds := 3;
1789 use_inlining_arguments_set o3_arguments;
1790 use_inlining_arguments_set ~round:1 o2_arguments;
1791 use_inlining_arguments_set ~round:0 o1_arguments
1792 let _remove_unused_arguments = set remove_unused_arguments
1793 let _rounds n = simplify_rounds := (Some n)
1794 let _unbox_closures = set unbox_closures
1795 let _unbox_closures_factor f = unbox_closures_factor := f
1796 let _verbose = set verbose
1797 end
1798
1799 module Compiler = struct
1800 let _a = set make_archive
1801 let _annot = set annotations
1802 let _args = Arg.read_arg
1803 let _args0 = Arg.read_arg0
1804 let _binannot = set binary_annotations
1805 let _c = set compile_only
1806 let _cc s = c_compiler := (Some s)
1807 let _cclib s = defer (ProcessObjects (Misc.rev_split_words s))
1808 let _ccopt s = first_ccopts := (s :: (!first_ccopts))
1809 let _config = Misc.show_config_and_exit
1810 let _config_var = Misc.show_config_variable_and_exit
1811 let _dprofile () = profile_columns := Profile.all_columns
1812 let _dtimings () = profile_columns := [`Time]
1813 let _dump_into_file = set dump_into_file
1814 let _for_pack s = for_package := (Some s)
1815 let _g = set debug
1816 let _i () =
1817 print_types := true;
1818 compile_only := true;
1819 stop_after := (Some Compiler_pass.Typing);
1820 ()
1821 let _impl = impl
1822 let _intf = intf
1823 let _intf_suffix s = Config.interface_suffix := s
1824 let _keep_docs = set keep_docs
1825 let _keep_locs = set keep_locs
1826 let _linkall = set link_everything
1827 let _match_context_rows n = match_context_rows := n
1828 let _no_keep_docs = clear keep_docs
1829 let _no_keep_locs = clear keep_locs
1830 let _noautolink = set no_auto_link
1831 let _o s = output_name := (Some s)
1832 let _opaque = set opaque
1833 let _pack = set make_package
1834 let _plugin _p = plugin := true
1835 let _pp s = preprocessor := (Some s)
1836 let _runtime_variant s = runtime_variant := s
1837 let _stop_after pass =
1838 let module P = Compiler_pass in
1839 match P.of_string pass with
1840 | None -> () (* this should not occur as we use Arg.Symbol *)
1841 | Some pass ->
1842 stop_after := (Some pass);
1843 match pass with
1844 | P.Parsing | P.Typing -> compile_only := true
1845 let _thread = set use_threads
1846 let _verbose = set verbose
1847 let _version () = print_version_string ()
1848 let _vnum () = print_version_string ()
1849 let _where () = print_standard_library ()
1850 let _with_runtime = set with_runtime
1851 let _without_runtime = clear with_runtime
1852 end
1853
1854 module Toplevel = struct
1855
1856 let print_version () =
1857 Printf.printf "The OCaml toplevel, version %s\n" Sys.ocaml_version;
1858 exit 0;
1859 ;;
1860
1861 let print_version_num () =
1862 Printf.printf "%s\n" Sys.ocaml_version;
1863 exit 0;
1864 ;;
1865
1866 let _args (_:string) = (* placeholder: wrap_expand Arg.read_arg *) [||]
1867 let _args0 (_:string) = (* placeholder: wrap_expand Arg.read_arg0 *) [||]
1868 let _init s = init_file := (Some s)
1869 let _no_version = set noversion
1870 let _noinit = set noinit
1871 let _noprompt = set noprompt
1872 let _nopromptcont = set nopromptcont
1873 let _stdin () = (* placeholder: file_argument ""*) ()
1874 let _version () = print_version ()
1875 let _vnum () = print_version_num ()
1876 end
1877
1878 module Topmain = struct
1879 include Toplevel
1880 include Core
1881 let _dinstr = set dump_instr
1882 end
1883
1884 module Opttopmain = struct
1885 include Toplevel
1886 include Native
1887 include Core
1888 end
1889
1890 module Optmain = struct
1891 include Native
1892 include Core
1893 include Compiler
1894 let _afl_inst_ratio n = afl_inst_ratio := n
1895 let _afl_instrument = set afl_instrument
1896 let _function_sections () =
1897 assert Config.function_sections;
1898 first_ccopts := ("-ffunction-sections" :: (!first_ccopts));
1899 function_sections := true
1900 let _nodynlink = clear dlcode
1901 let _output_complete_obj () =
1902 set output_c_object (); set output_complete_object ()
1903 let _output_obj = set output_c_object
1904 let _p () =
1905 fatal
1906 "Profiling with \"gprof\" (option `-p') is only supported up to \
1907 OCaml 4.08.0"
1908 let _shared () = shared := true; dlcode := true
1909 let _v () = print_version_and_library "native-code compiler"
1910 end
1911
1912 module Odoc_args = struct
1913 include Common
1914 let _I(_:string) =
1915 (* placeholder:
1916 Odoc_global.include_dirs := (s :: (!Odoc_global.include_dirs))
1917 *) ()
1918 let _impl (_:string) =
1919 (* placeholder:
1920 Odoc_global.files := ((!Odoc_global.files) @ [Odoc_global.Impl_file s])
1921 *) ()
1922 let _intf (_:string) = (* placeholder:
1923 Odoc_global.files := ((!Odoc_global.files) @ [Odoc_global.Intf_file s])
1924 *) ()
1925 let _intf_suffix s = Config.interface_suffix := s
1926 let _pp s = Clflags.preprocessor := (Some s)
1927 let _ppx s = Clflags.all_ppx := (s :: (!Clflags.all_ppx))
1928 let _thread = set Clflags.use_threads
1929 let _v () = Compenv.print_version_and_library "documentation generator"
1930 let _verbose = set Clflags.verbose
1931 let _version = Compenv.print_version_string
1932 let _vmthread = ignore
1933 let _vnum = Compenv.print_version_string
1934 end
1935
1936 module Main = struct
1937
1938 let vmthread_removed_message = "\
1939 The -vmthread argument of ocamlc is no longer supported\n\
1940 since OCaml 4.09.0. Please switch to system threads, which have the\n\
1941 same API. Lightweight threads with VM-level scheduling are provided by\n\
1942 third-party libraries such as Lwt, but with a different API."
1943
1944 include Core
1945 include Compiler
1946 let _compat_32 = set bytecode_compatible_32
1947 let _custom = set custom_runtime
1948 let _dcamlprimc = set keep_camlprimc_file
1949 let _dinstr = set dump_instr
1950 let _dllib s = defer (ProcessDLLs (Misc.rev_split_words s))
1951 let _dllpath s = dllpaths := ((!dllpaths) @ [s])
1952 let _make_runtime () =
1953 custom_runtime := true; make_runtime := true; link_everything := true
1954 let _no_check_prims = set no_check_prims
1955 let _output_complete_obj () =
1956 output_c_object := true;
1957 output_complete_object := true;
1958 custom_runtime := true
1959 let _output_complete_exe () =
1960 _output_complete_obj (); output_complete_executable := true
1961 let _output_obj () = output_c_object := true; custom_runtime := true
1962 let _use_prims s = use_prims := s
1963 let _use_runtime s = use_runtime := s
1964 let _v () = print_version_and_library "compiler"
1965 let _vmthread () = fatal vmthread_removed_message
1966 end
1967
1968 end
1969