rules_ocaml icon indicating copy to clipboard operation
rules_ocaml copied to clipboard

bytecode mode: -custom and ocamlrun

Open mobileink opened this issue 4 years ago • 0 comments

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."

mobileink avatar Jan 14 '21 02:01 mobileink