-a | Build a library (.cma file) with the object files (.cmo files) given on the command line, instead of linking them into an executable file. | help + man |
-alert list | Enable or disable alerts according to <list>: +<alertname> enable alert <alertname> | help |
-absname | Show absolute filenames in error messages | help |
-annot | (deprecated) Save information in <filename>.annot | help + man |
-bin-annot | Dump detailed information about the compilation (types, bindings, tail-calls, etc) in binary format. | help + man |
-c | Compile only (do not link) | help + man |
-cc command | Use <command> as the C compiler and linker | help |
-cclib opt | Pass option <opt> to the C linker | help |
-ccopt opt | Pass option <opt> to the C compiler and linker | help |
-color auto|always|never | Enable or disable colors in compiler messages The following settings are supported: auto use heuristics to enable colors only if supported always enable colors never disable colors The default… | help |
-error-style contextual|short | Control the way error messages and warnings are printed The following settings are supported: short only print the error and its location contextual like "short", but also display the source code… | help |
-compat-32 | Check that the generated bytecode executable can run on 32-bit platforms and signal an error if it cannot. | help + man |
-config | Print the version number of ocamlc(1) and a detailed summary of its configuration, then exit. | help + man |
-config-var | Print the value of a configuration variable, without a newline, and exit (print nothing and exit with error value if the variable does not exist) | help + man |
-custom | Link in "custom runtime" mode. | help + man |
-dllib lib | Use the dynamically-loaded library <lib> | help |
-dllpath dir | Add <dir> to the run-time search path for shared libraries | help |
-dtypes | (deprecated) same as -annot | help |
-for-pack ident | Generate code that can later be `packed' with ocamlc -pack -o <ident>.cmo | help |
-g | Add debugging information while compiling and linking. | help + man |
-i | Cause the compiler to print all defined names (with their inferred types or their definitions) when compiling an implementation (.ml file). | help + man |
-I dir | Add <dir> to the list of include directories | help |
-impl file | Compile <file> as a .ml file | help |
-intf file | Compile <file> as a .mli file | help |
-intf-suffix string | Suffix for interface files (default: .mli) | help |
-intf_suffix string | (deprecated) same as -intf-suffix | help |
-keep-docs | Keep documentation strings in generated .cmi files. | help + man |
-no-keep-docs | Do not keep documentation strings in .cmi files (default) | help |
-keep-locs | Keep locations in generated .cmi files. | help + man |
-no-keep-locs | Do not keep locations in .cmi files | help |
-labels | Labels are not ignored in types, labels may be used in applications, and labelled parameters can be given in any order. | help + man |
-linkall | Force all modules contained in libraries to be linked in. | help + man |
-make-runtime | Build a custom runtime system (in the file specified by option -o) incorporating the C object files and libraries given on the command line. | help + man |
-make_runtime | (deprecated) same as -make-runtime | help |
-modern | (deprecated) same as -labels | help |
-alias-deps | Do record dependencies for module aliases | help |
-no-alias-deps | Do not record dependencies for module aliases. | help + man |
-app-funct | Activate applicative functors | help |
-no-app-funct | Deactivates the applicative behaviour of functors. | help + man |
-no-check-prims | Do not check runtime for primitives | help |
-noassert | Do not compile assertion checks. | help + man |
-noautolink | When linking .cma libraries, ignore -custom, -cclib and -ccopt options potentially contained in the libraries (if these options were given when building the libraries). | help + man |
-nolabels | Ignore non-optional labels in types. | help + man |
-nostdlib | Do not automatically add the standard library directory to the list of directories searched for compiled interface files (.cmi), compiled object code files (.cmo), libraries (.cma), and C libraries… | help + man |
-nopervasives | (undocumented) | help |
-o file | Set output file name to <file> | help |
-opaque | Interface file compiled with this option are marked so that other compilation units depending on it will not rely on any implementation details of the compiled implementation. | help + man |
-open module | Opens the module <module> before typing | help |
-output-obj | Cause the linker to produce a C object file instead of a bytecode executable file. | help + man |
-output-complete-obj | Same as -output-obj except when creating an object file where it includes the runtime and autolink libraries. | help + man |
-output-complete-exe | Output a self-contained executable, including runtime and C stubs | help |
-pack | Build a bytecode object file (.cmo file) and its associated compiled interface (.cmi) that combines the object files given on the command line, making them appear as sub-modules of the output .cmo… | help + man |
-pp command | Pipe sources through preprocessor <command> | help |
-ppx command | Pipe abstract syntax trees through preprocessor <command> | help |
-plugin plugin | (no longer supported) | help |
-principal | Check information path during type-checking, to make sure that all types are derived in a principal way. | help + man |
-no-principal | Do not check principality of type inference (default) | help |
-rectypes | Allow arbitrary recursive types during type-checking. | help + man |
-no-rectypes | Do not allow arbitrary recursive types (default) | help |
-runtime-variant str | Use the <str> variant of the run-time system | help |
-safe-string | Enforce the separation between types string and bytes, thereby making strings read-only. | help + man |
-short-paths | When a type is visible under several module-paths, use the shortest one when printing the type's name in inferred interfaces and error and warning messages. | help + man |
-strict-sequence | Force the left-hand part of each sequence to have type unit. | help + man |
-no-strict-sequence | Left-hand part of a sequence need not have type unit (default) | help |
-strict-formats | Reject invalid formats accepted by legacy implementations (Warning: Invalid formats may behave differently from previous OCaml versions, and will become always-rejected in future OCaml versions. | help |
-no-strict-formats | Accept invalid formats accepted by legacy implementations (default) (Warning: Invalid formats may behave differently from previous OCaml versions, and will become always-rejected in future OCaml… | help |
-thread | (deprecated) same as -I +threads | help |
-unboxed-types | When a type is unboxable (i.e. a record with a single argument or a concrete datatype with a single constructor of one argument) it will be unboxed unless annotated with [@@ocaml.boxed]. | help + man |
-no-unboxed-types | When a type is unboxable it will be boxed unless annotated with [@@ocaml.unboxed]. | help + man |
-unsafe | Turn bound checking off for array and string accesses (the v.(i)ands.[i] constructs). | help + man |
-unsafe-string | Identify the types string and bytes, thereby making strings writable. | help + man |
-use-runtime file | Generate bytecode for the given runtime system | help |
-use_runtime file | (deprecated) same as -use-runtime | help |
-v | Print the version number of the compiler and the location of the standard library directory, then exit. | help + man |
-verbose | Print all external commands before they are executed, in particular invocations of the C compiler and linker in -custom mode. | help + man |
-version | Print version and exit | help |
--version | Print version and exit | help |
-vmthread | (no longer supported) | help |
-vnum | Print version number and exit | help |
-w list | Enable or disable warnings according to <list>: +<spec> enable warnings in <spec> | help |
-warn-error list | Enable or disable error status for warnings according to <list>. | help |
-warn-help | Show the description of all available warning numbers. | help + man |
-where | Print the location of the standard library, then exit. | help + man |
-match-context-rows n | Set number of rows of context used during pattern matching compilation. | help + man |
-use-prims file | (undocumented) | help |
-dno-unique-ids | (undocumented) | help |
-dunique-ids | (undocumented) | help |
-dno-locations | (undocumented) | help |
-dlocations | (undocumented) | help |
-dsource | (undocumented) | help |
-dparsetree | (undocumented) | help |
-dtypedtree | (undocumented) | help |
-dshape | (undocumented) | help |
-drawlambda | (undocumented) | help |
-dlambda | (undocumented) | help |
-dinstr | (undocumented) | help |
-dcamlprimc | (undocumented) | help |
-dtimings | Print timings information for each pass | help |
-dprofile | Print performance information for each pass The columns are: time alloc top-heap absolute-top-heap. | help |
-dump-into-file | dump output like -dlambda into <target>.dump | help |
-help | Display this list of options | help |
--help | Display this list of options | help |
-name Disable | @name Enable and mark as fatal warning name. (in the manual page but not in --help) | man |
-num Disable | @num Enable and mark as fatal warning number num. (in the manual page but not in --help) | man |
-num1..num2 Disable | @num1..num2 Enable and mark as fatal all warnings between num1 and num2 (inclusive). (in the manual page but not in --help) | man |
-letter Disable | @letter Enable and mark as fatal the set of warnings corresponding to letter. (in the manual page but not in --help) | man |
-with-runtime | Include the runtime system in the generated program. (in the manual page but not in --help) | man |
-without-runtime | The compiler does not include the runtime system (nor a reference to it) in the generated program; (in the manual page but not in --help) | man |