rules_ocaml
rules_ocaml copied to clipboard
bytecode mode: -custom and ocamlrun
Currently ocaml_executable in bytecode mode always adds -custom.
Proposal: support compilation for ocamlrun, without -custom.
Chapter 9:
"In the default linking mode, the linker produces bytecode that is intended to be executed with the shared runtime system, ocamlrun. In the custom runtime mode, the linker produces an output file that contains both the runtime system and the bytecode for the program. The resulting file is larger, but it can be executed directly, even if the ocamlrun command is not installed. Moreover, the “custom runtime” mode enables static linking of OCaml code with user-defined C functions, as described in chapter 20."